Dynamic vlookup formula

Rszink77

New Member
Joined
Apr 1, 2022
Messages
2
Office Version
  1. 2021
Platform
  1. Windows
Hi I have been trying to figure out how to create a dynamic table array for my vlookup that references a different workbook. I would like the sheet name to be dynamic using a specific cell value from the original workbook. Each sheet is saved as a date in mm dd yyyy format. I would like to replace the 01 08 2022 with cell (D2) Is this be possible to do? I have gotten errors every way I've tried and am stumped!

=VLOOKUP(A2,'[FC YTD.xlsm]01 08 2022'!$A:$AZ,37,0)
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
=VLOOKUP(A2,indirect("'[FC YTD.xlsm]"&D2&"'!$A:$AZ"),37,0)

I have modified to work on a simple sheet using, and its name for my system - BUT above should work with OPEN books

=VLOOKUP(A2,INDIRECT("'[FC YTD.xlsx]"&D2&"'!$A:$B"),2,0)
and it work - BUT with the workbook needs to be open at the same time

do you want to work with the workbook closed ?

test.xlsx
ABCDE
1#N/A2
2b01 08 2022
3
4
Sheet2
Cell Formulas
RangeFormula
A1A1=VLOOKUP(A2,'[FC YTD.xls]01 08 2022'!$A:$B,2,0)
B1B1=VLOOKUP(A2,INDIRECT("'[FC YTD.xlsx]"&D2&"'!$A:$B"),2,0)


FC YTD.xlsx
AB
1
2a1
3b2
4c3
5
01 08 2022
 
Upvote 0
Thank you! I would like it to work with a closed sheet if possible
 
Upvote 0
i have been looking how to use with a closed workbook, and as far as i can work out its not possible with INDIRECT(), other members my know a way

you may ned to be using VBA for a solution to a closed workbook, but i dont supply solutions to VBA as my knowledge is to outdated now

there are some comments that it may work with the full path - but as i'm on a MAC OSX - not sure on the path for my example - really used to windows paths
c:/user/... etc type path

as you are using office 2021 , it may have the LET function and something may be possible using that - but i dont know myself

I will see if i can work out how to enter a full path in Excel for Mac and test - so may reply later , otherwise hopefully other members will know
 
Upvote 0

Forum statistics

Threads
1,214,643
Messages
6,120,707
Members
448,981
Latest member
recon11bucks

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