Index Match question

JG2021

New Member
Joined
Apr 2, 2021
Messages
4
Office Version
  1. 365
Platform
  1. Windows
I am trying to index match to another excel doc in order to get supply totals. The other doc will always be named after today's date. I was wondering if there was a way to break into the title of the doc in the index match to have it constantly updating. Here's what I would like to do

=INDEX(CONCAT("'[",MONTH(TODAY()),".",DAY(TODAY()),".",RIGHT(YEAR(TODAY()),2),".xlsm]",MONTH(TODAY()),".",DAY(TODAY()),"'!$I:$I"),MATCH($A:$A,CONCAT("'[",MONTH(TODAY()),".",DAY(TODAY()),".",RIGHT(YEAR(TODAY()),2),".xlsm]",MONTH(TODAY()),".",DAY(TODAY()),"'!$A:$A"),0))

Is there a way to do this or not?

Thank you.
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
You need to use the INDIRECT function for that, e.g.
Excel Formula:
INDIRECT(CONCAT("'[",MONTH(TODAY()),".",DAY(TODAY()),".",RIGHT(YEAR(TODAY()),2),".xlsm]",MONTH(TODAY()),".",DAY(TODAY()),"'!$I:$I"))
Note that it will only work when the other document is open. There is no way around that.
 
Upvote 0
There is a way to do it using the INDIRECT function. I believe you want this:

=INDEX(INDIRECT(CONCAT("'[",MONTH(TODAY()),".",DAY(TODAY()),".",RIGHT(YEAR(TODAY()),2),".xlsm]",MONTH(TODAY()),".",DAY(TODAY()),"'!$I:$I")),MATCH($A:$A,INDIRECT(CONCAT("'[",MONTH(TODAY()),".",DAY(TODAY()),".",RIGHT(YEAR(TODAY()),2),".xlsm]",MONTH(TODAY()),".",DAY(TODAY()),"'!$A:$A")),0))

But without your files to test with I can't guarantee it.

Edit: Jason is correct, the INDIRECT function requires an external file to be open. When it is closed you will get a #REF error. The only alternative that allows reference to a closed file is to use a macro to build the formula.
 
Upvote 0

Forum statistics

Threads
1,215,472
Messages
6,125,011
Members
449,204
Latest member
tungnmqn90

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