Vlookup where range is a name ina cell

FinancialAnalystKid

Well-known Member
Joined
Oct 14, 2004
Messages
779
I have groups of data in separate worksheets. In the master I have the same data and the name of the worksheet its in.

HOw can I run a vlookup to reference the worksheet based on the name in the cell?

For example. If I have a worksheet named PLAN1 in cell U2 and need to look up data in that worksheet I want my formula to work like this:

=vlookup(b2,U2&"!"$b$3:$M$1840,12,false)

The part that is bolded is the part I can't figure out where U2 is the worksheet name.
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.

Smitty

Legend
Joined
May 15, 2003
Messages
29,536
Take a look at INDIRECT(), which will let you reference a sheet name stored in a cell.

HTH,

Smitty
 
Upvote 0

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,210
FinancialAnalystKid said:
I have groups of data in separate worksheets. In the master I have the same data and the name of the worksheet its in.

HOw can I run a vlookup to reference the worksheet based on the name in the cell?

For example. If I have a worksheet named PLAN1 in cell U2 and need to look up data in that worksheet I want my formula to work like this:

=vlookup(b2,U2&"!"$b$3:$M$1840,12,false)

The part that is bolded is the part I can't figure out where U2 is the worksheet name.

=VLOOKUP(B2,INDIRECT("'"&U2&"'!B3:M1480"),12,0)
 
Upvote 0

FinancialAnalystKid

Well-known Member
Joined
Oct 14, 2004
Messages
779
I tried Indirect

=VLOOKUP(B3,INDIRECT(U3&"!"&$B$3:$M$1840),12,FALSE)

Says it's a circular reference.

And this:

=VLOOKUP(B3,INDIRECT(U3&"!")&$B$3:$M$1840),12,FALSE)

Doesn't work.
 
Upvote 0

Forum statistics

Threads
1,195,582
Messages
6,010,581
Members
441,557
Latest member
Jbest23

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
Top