Vlookup from external workbook

mattless1

Board Regular
Joined
Apr 1, 2011
Messages
89
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.
 

JustynaMK

Active Member
Joined
Aug 28, 2016
Messages
497
Office Version
365, 2013
Platform
Windows
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.
 

Jon von der Heyden

MrExcel MVP, Moderator
Joined
Apr 6, 2004
Messages
10,735
Office Version
365
Platform
Windows
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).
 

Forum statistics

Threads
1,082,250
Messages
5,364,027
Members
400,774
Latest member
Goldi paul

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top