Sheet reference in formula using indirect cell with a date

theAphex

New Member
Joined
Sep 9, 2011
Messages
7
I have a primary worksheet with multiple dates going across row 2, and 30 additional sheets, one for each day (in the format 1-Sep, and so on). I need a formula below each date that uses the date in that column to look at the appropriate sheet for the calculation.

For Example, the date (1-Sep) is contained in Cell C2, when I use the formula as follows, i get a #REF

=VLOOKUP($B4,(INDIRECT("'" & C2 & "'!$B$5:$0$150")),13,FALSE)

i would like the formula to interpret that as;

=VLOOKUP($B4,'1-Sep'!$B$5:$0$150,13,FALSE)

Any ideas? It looks like it might be taking the date and changing 1-Sep to 40787
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
You have a zero as the letter reference you have $B$5:$zero$150 I think it should be an o not a 0 see the difference O 0 even if it is capped.
 
Upvote 0
I have a primary worksheet with multiple dates going across row 2, and 30 additional sheets, one for each day (in the format 1-Sep, and so on). I need a formula below each date that uses the date in that column to look at the appropriate sheet for the calculation.

For Example, the date (1-Sep) is contained in Cell C2, when I use the formula as follows, i get a #REF

=VLOOKUP($B4,(INDIRECT("'" & C2 & "'!$B$5:$0$150")),13,FALSE)

i would like the formula to interpret that as;

=VLOOKUP($B4,'1-Sep'!$B$5:$0$150,13,FALSE)

Any ideas? It looks like it might be taking the date and changing 1-Sep to 40787
Try it like this...

=VLOOKUP($B4,INDIRECT("'"&TEXT(C2,"d-mmm")&"'!B5:O150"),13,0)

BTW...

In your posted formula the reference to O150 is using zero instead of the letter O, zero150.
 
Upvote 0

Forum statistics

Threads
1,224,602
Messages
6,179,843
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top