Using Vlookup with indirect function

D

Deleted member 415602

Guest
Hi guys,

I have a formula looking like this:
=VLOOKUP("Name",'C:\Users\mass\Desktop\stats[SCORECARD.xlsx]Sheet14'!$D$30:$K$30,5,FALSE)
This allow me to find the value adjacent to the cell containing Name in another workbook.
Now... I want to be able to write something like SheetA1' instead of Sheet14 in the formula. I only want to change the sheet number with another cell value.
I guess I'll have to use something with indirect() but I have no idea to do it.

Thank you for your help !
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Greetings massoud15
You could try using the VLOOKUP function inside a nested IF function like this.

=IF(A1=1,VLOOKUP("Name",'C:\Users\mass\Desktop\[stats[SCORECARD.xlsx]Sheet14]stats[SCORECARD.xlsx]Sheet14'!$D$30:$K$30,5,FALSE),VLOOKUP("Name",'C:\Users\mass\Desktop\[stats[SCORECARD.xlsx]SheetA1]stats[SCORECARD.xlsx]SheetA1'!$D$30:$K$30,5,FALSE))

Do you need to VLOOKUP from 2 sheets or more?
 
Upvote 0
INDIRECT only works on open files.. Maybe take a look at the Morefuc add-in which allows using INDIRECT on closed workbooks
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,193
Members
452,616
Latest member
intern444

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