Michael Frank
Michael Frank

Reputation: 1

Importrange with indirect

Im trying to pull data off another sheet using ImportRange which if i type everything out(=Importrange("URL","8!AD4") it works fine I want to make the 8 in the "8!AD4" reference a cell in the sheet I'm working in. I tried to use =Importrange("https://URL", INDIRECT(AI6) &"!AD4")

The error I keep getting.

I get Function Indirect parameter 1 value is '15'. It is not a valid cell/range reference. I have the format set to plain text

Upvotes: 0

Views: 251

Answers (2)

rockinfreakshow
rockinfreakshow

Reputation: 29904

Skip indirect; just go with:

=importrange("URL",AI6&"!AD4")

Upvotes: 2

player0
player0

Reputation: 1

you should use =IMPORTRANGE("id"; AI6&"!AD4") as 2nd argument of IMPORTRANGE is already an INDIRECT

but for educational purposes here is an alternative:

=IMPORTRANGE("id"; ADDRESS(4; 30 ;;; AI6))
  • "id" - part of the URL between /d/ and /edit#
  • 4 - 4th row
  • 30 - 30th column = column AD
  • 5th parameter of ADDRESS referencing the sheet name

Upvotes: 0

Related Questions