Increment Sheet reference automatically in formula?

slam

Well-known Member
Joined
Sep 16, 2002
Messages
873
Office Version
  1. 365
  2. 2019
Hi gang!

I have the following VLOOKUP in C2:

Excel Formula:
=VLOOKUP($A2,'2020-03-18'!$A$2:$C$100,3,FALSE)

I want to convert the sheet name part of this formula, '2020-03-18'! to be a cell reference, specifically C1.

I have all my sheet names listed in row 1, column C and onward, using the instruction found here which utilizes name manager and this formula:

Excel Formula:
=INDEX(SheetNames,Sheetnumbers!C1)

In my VLOOKUP, is there a way that I can replace the sheet name so I can copy the formula down and across to have it automatically update with the sheet name that's listed in row 1?

Thanks!
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
I've evolved my formula a little, and I'm using INDIRECT now, but it's giving me a #REF!

Anything obviously wrong with it?

Excel Formula:
=VLOOKUP($A2,INDIRECT(C$1&"!$A$2:$C$100"),3,FALSE)

Thanks!
 
Upvote 0
Try it like
Excel Formula:
=VLOOKUP($A2,INDIRECT("'"&C$1&"'!$A$2:$C$100"),3,FALSE)
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,541
Messages
6,125,413
Members
449,223
Latest member
Narrian

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