Vlookup from external workbook

mattless1

Board Regular
Joined
Apr 1, 2011
Messages
102
Hi All,

Can someone help me with this formula below.
i wish to extract a cell value from a different workbook. The workbook name stays the same, but the date changes everyday

workbook Name is IBT PRINT LIST 22nd July 2019.xlsx

=VLOOKUP(B8,'[IBT PRINT LIST 22nd July 2019.xlsx]Sheet1'!B$2:X$47,5,0)

Any help would be greatly appreciated.
 

Excel Facts

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

You can use the following formula to "produce" the adjusted Workbook Name for a given day (TODAY()):
Code:
="IBT PRINT LIST "&DAY(TODAY())&IFERROR(CHOOSE(MOD(DAY(TODAY()),10),"st","nd","rd"),"th")&" "&TEXT(TODAY(),"mmmm yyyy")

You can then reference this value (let's say it's in cell D9) in your VLOOKUP formula:
Code:
=VLOOKUP(B8,INDIRECT("'["&D9&".xlsm]Sheet1'!B$2:X$47"),5,0)

Of course you can combine these two into one formula but I thought it would be clearer to show how each component is working separately :)

Hope it helps.
 
Upvote 0
Keep in mind that the workbook will need to be open. INDIRECT will return #REF ! error if the workbook is closed. * Unless it has changed in Excel 2016 (untested).
 
Upvote 0

Forum statistics

Threads
1,213,524
Messages
6,114,117
Members
448,549
Latest member
brianhfield

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