Google Sheets – Use Cell Value to Define Sheet in IMPORTRANGE

formulasgoogle sheetsimportrange

Trying to create a spreadsheet that reads values from a certain sheet of another file using importrange formula.
I am trying that the referenced external cell be a cell on the current one so I could try to do something like:

=IMPORTRANGE("XXXXXXXXXXXXXXXXXXXXXXX_XXXXXXXXXXXX";**E2**&"!G3"))

E2 local cell is the name of the remote sheet I want to import from.

This reply looked very promising using the INDIRECT formula but so far I haven't managed to archive it within an importrange not sure if due to a syntax error or a limitation of the importrange:

=IMPORTRANGE("XXXXXXXXXXXXXXXXXXXXXXX_XXXXXXXXXXXX";INDIRECT(E2&"!G3"))

Best Answer

IMPORTRANGE is like a smaller sister of INDIRECT so you are not supposed to have INDIRECT in IMPORTRANGE, so all you need to do is to allow access and:

0

=IMPORTRANGE("16nnuzNRx_kGGJm1EBVX7kBT2bfW1-2TYwSiuaLF-QI"; E2&"!G3")

0