VLOOKUP without clicking on the sheet name (and no VBA)

csliger931

New Member
Joined
Jul 22, 2020
Messages
21
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi,
I'm looking for a way to have the VLOOKUP formula scan a different sheet for values without having to click on the different sheet. For example, lets say I have a table in sheet Shoes that has a column of names in column A ("Jeff", "Stacy", "Greg") and a column of shoe sizes in Column B (12, 8.5, 10). And then lets say in sheet ANALYSIS, I want to have a VLOOKUP formula (in Cell B1) find the shoe size for Stacy (Cell A1). Typically, I would type =VLOOKUP(A1, and then I would click the Shoes sheet, and then I would highlight columns A and B, and then I would type 2,false). The final formula would be =VLOOKUP(A1,Shoes!F10:H18,2,false). But that is going to be time consuming for what I need to do. I would prefer not have to click the sheet Shoes (and instead, just reference a a cell that has my sheet name in it). Is there a way to do this? Maybe using the INDIRECT formula? I'm an idiot when it comes to Excel, so apologies if this is a dumb question or confusing. I really appreciate the help!
Thanks!
Chris
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
You need to give name to the range (A:B) in "Shoes" sheet
Then after you will not need to click on sheet name
For VLOOKUP table array You can just select the name which you have given to your range in particular sheet and then column index number
 
Upvote 0
Suppose you use this in B1 of ANALYSIS:
Code:
=XLOOKUP(A2,INDIRECT("'"&A1&"'!B1:B10"),INDIRECT("'"&A1&"'!A1:A10"),"")
and have the sheet name you want in A1 of ANALYSIS and the search-for value in B1 of ANALYSIS
 
Upvote 0
Solution
Suppose you use this in B1 of ANALYSIS:
Code:
=XLOOKUP(A2,INDIRECT("'"&A1&"'!B1:B10"),INDIRECT("'"&A1&"'!A1:A10"),"")
and have the sheet name you want in A1 of ANALYSIS and the search-for value in B1 of ANALYSIS
You are awesome! I was having some trouble with the Xlookup function (for some reason, Excel didn't recognize it as a formula, even when I entered it as an array w/ Ctrl+Shft+Entr), but when I changed it to a VLOOKUP (and slightly modified your formula), it worked! I really need to learn more about the Indirect function, because it seems very useful and I rarely use it. Anyways, thanks again!
 
Upvote 0
You need to give name to the range (A:B) in "Shoes" sheet
Then after you will not need to click on sheet name
For VLOOKUP table array You can just select the name which you have given to your range in particular sheet and then column index number
Thanks for the reply!
 
Upvote 0
You are awesome! I was having some trouble with the Xlookup function (for some reason, Excel didn't recognize it as a formula, even when I entered it as an array w/ Ctrl+Shft+Entr), but when I changed it to a VLOOKUP (and slightly modified your formula), it worked! I really need to learn more about the Indirect function, because it seems very useful and I rarely use it. Anyways, thanks again!
Were you using 365 or 2016?
 
Upvote 0

Forum statistics

Threads
1,214,833
Messages
6,121,862
Members
449,052
Latest member
Fuddy_Duddy

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