Automatically use the right tab in a vlookup

LadyHarper

Board Regular
Joined
Jun 28, 2017
Messages
63
Office Version
  1. 365
Platform
  1. Windows
I have a spreadsheet, that needs to look up internal and external rates.

Currently I use Vlookup and tell it which tab to look for based on the project it is on. In my spreadsheet I have Column B that says the Tab reference.

Is there a Formula that I can set so it automatically uses the Vlookup in the correct tab?

=VLOOKUP($H485,'EX51'!$I$2:$S$57,11,FALSE) = the EX51 is where I am telling it what tab, looking to change that to check Cell B for the correct tab.
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
You can do that with

Excel Formula:
INDIRECT("'"&EX51&"'!$I$2:$S$57")
 
Upvote 0
I'm not sure if I am doing something wrong, as it is not working.

=VLOOKUP($H479,(look in Cell B479)$I$2:$S$57,11,FALSE)

Cell B479 with have the tab from across the bottom that I need it to look at for the vlookup reference.
 
Upvote 0
Excel Formula:
=VLOOKUP($H479,INDIRECT("'"&B479&"'!$I$2:$S$57"),11,FALSE)

Does B479 ever change when you drag the formula?
 
Upvote 0
B437 has EX54 in it, and I want it to find the tab across the bottom that say EX54 and vlookup the info from that tab... I hope I'm explaining it correctly
 
Upvote 0
It's not helping that the cell containing the tab name seems to keep changing each time you reply.

Excel Formula:
=VLOOKUP($H479,INDIRECT("'"&B437&"'!$I$2:$S$57"),11,FALSE)
 
Upvote 0
For the B437 or B479... I have the right numbers in. I am sitting in Cell I437, and put in the formula = =VLOOKUP($H437,INDIRECT("'"&B437&"'!$I$2:$S$57"),11,FALSE)

Its giving me a result of #N/A, but if I do a normal vlookup, and just tell it tab EX54 then it finds it....

My B column changes to the correct tab name I want it to look under. As there are multiple tabs.
 
Upvote 0
Are there any extra spaces in your tab names in Col B? I tested the formula (with different ranges) but the concept is working. So that tells me there is something wrong with the sheet names in Col B.
Book1
ABC
15EX41FFig
16EX51AApple
Sheet1
Cell Formulas
RangeFormula
C15:C16C15=VLOOKUP($B15,INDIRECT("'"&A15&"'!$A$2:$B$5"),2,FALSE)


Book1
AB
2EEggplant
3FFig
4GGrapes
5HHummus
EX41


Book1
AB
2AApple
3BBanana
4CCitrus
5DDragon Fruit
EX51
 
Upvote 0
1729722879564.png


1729722826493.png


=VLOOKUP($H437,INDIRECT("'"&B437&"'!$I$2:$S$57"),11,FALSE)

It looks right to me, so if you see something wrong pleasse let me know
 
Upvote 0

Forum statistics

Threads
1,224,817
Messages
6,181,144
Members
453,021
Latest member
Justyna P

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