Reputation: 147
I have a main sheet with my data and 31 possible sheets with additional data used for input for various calculations. I want to use a VLOOKUP to grab the correct data, but Iml having a hard time with the additional sheet reference. I'm hoping to make this a dynamic formula based on the date in the third column on the main sheet.
This is what currently works:
=VLOOKUP(A2,'1'!$A$1:$B$153, 2,TRUE )
I'm hoping to get something like the below to work:
=VLOOKUP(A2,' "Day(C2)" '!$A$1:$B$153, 2,TRUE )
where C2 is my date, so then it would grab the day from that date and do the lookup against that sheet and range.
Upvotes: 1
Views: 548
Reputation: 149287
You need to use INDIRECT
.
=VLOOKUP(A2,INDIRECT("'" & "1" & "'!$A$1:$B$153"),2,TRUE)
Now simply replace "1"
with Day(C2)
=VLOOKUP(A2,INDIRECT("'" & DAY(C2) & "'!$A$1:$B$153"),2,TRUE)
Screenshot
Upvotes: 1