INDIRECT FUNCTION TO GIVE FILE NAME in linked formula

Anne Troy

MrExcel MVP
Joined
Feb 18, 2002
Messages
2,632
Office Version
  1. 365
Platform
  1. Windows
This is the linked formula:

='[90602.xlsm]Page 1'!$B$10

90602 is the invoice number.

How can I change the formula so that the 90602 comes from the cell to the left of the formula?

="'["&INDIRECT(A2)&".xlsm]Page 1'!$B$10" returns a #REF. Cells A2 and B10 both exist and contain the data I want.

Help!! THANKS in advance. :)
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
How about
Excel Formula:
=INDIRECT("'["&A2&".xlsm]Page 1'!$B$10")
 
Upvote 0
Is the other workbook open?
 
Upvote 0
Nevermind!

I don't know why it's putting XLSM as the file extension, when it's XLS. Thank you, that worked!
 
Upvote 0
Glad you sorted it & thanks for the feedback.
 
Upvote 0
Sure did. Found she's got thousands of files to go through so getting a macro. :)
 
Upvote 0

Forum statistics

Threads
1,214,960
Messages
6,122,479
Members
449,088
Latest member
Melvetica

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