Xlookup with Textjoin or Concat using date and filename

Joey_Ng

New Member
Joined
Mar 7, 2020
Messages
25
Office Version
  1. 365
Platform
  1. Windows
Hi,
I have the below original formula for Xlookup which works fine.
Original Formula: =XLOOKUP(E3,'[8th August 2022 Report.xlsx]Sheet1'!$B:$B,'[8th August 2022 Report.xlsx]Sheet1'!$T:$T,,0))

Now, the date of the filename changed everyday, eg, 9th August then 10th August etc... therefore I manually enter the date in Cell T1 (so I don't have to change the formula everyday) and incorporate into the formula using CONCATENATE(T1," 2022 Report.xlsx"). I am hoping someone could assist me with the end formula. Something like below. I am confused as to whether or not to include '[ in the CONCATENTATE formula.

=XLOOKUP(E3,CONCATENATE($T$1," 2022 Report.xlsx"]Sheet1'!$B:$B,CONCATENATE($T$1," 2022 Report.xlsx"]Sheet1'!$T:$T,,0))

Thank You in advance.

Joey
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
What exactly are you putting in T1?
 
Upvote 0
8th August is not a date, so do you have an actual date, or the text "8th August"?
 
Upvote 0
Hi Fluff,

Sorry have been offline for a while...

Basically, I want to be able to look up someone else's file and everyday they amended the filename as the date in words, eg, 8th August plus 2022 Report. So the day after it is "9th August 2022 Report" and the day after that is "10th August 2022 Report". Instead of amending the "date in words" in the formula, I want to put the date in words (eg, 8th August) in a cell then use "Concat" or "textjoin" to join the date (8th August) with "2022 Report.xlsx" in a xlookup or vlookup formula (so the lookup filename is "8th August" & "2022 Report.xlsx"). Hope it make sense.

Thanks,

Joey
 
Upvote 0
Ok, how about
Excel Formula:
=XLOOKUP(E3,INDIRECT($T$1&" 2022 Report.xlsx]Sheet1'!$B:$B"),INDIRECT($T$1&" 2022 Report.xlsx]Sheet1'!$T:$T"),,0)
but the other workbook will need to be open.
 
Upvote 0
Solution
Hi Fluff,

Thanks for that. I added ''[8th August in T1 to include '[ and it works well. Appreciate your help.

Thank You.

Joey
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,693
Members
448,979
Latest member
DET4492

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