Ryan Capule
Ryan Capule

Reputation: 143

IMPORTRANGE() based on the date of another cell?

I am trying to use IMPORTRANGE() to import a sheet from another spreadsheet. I am currently using the following formula.

=IMPORTRANGE("URL", B1&"!A1:R25")

However, I am getting stuck with the sheet name. B1 is a cell that shows a date, consequently I want to import the sheet with that date as its name. Also, B1 determines that date based on a formula; here it is

=(Leftb(Summary!$A$2,2)&"-"&Midb(Summary!$A$2,3,2)&"-"&rightb(Summary!$A$2,2))+7

I believe since B1 contains a formula like this, something is getting messed up in the importrange(), either the formula or the format of the date.

Upvotes: 0

Views: 356

Answers (1)

Marios
Marios

Reputation: 27348

Your current formula gets the value of the date, not the date that is displayed in the UI.

Try this formula:

=IMPORTRANGE("URL", TEXTJOIN("",TRUE,B1)&"!A1:R25")

RESULT

Upvotes: 2

Related Questions