Creating a dynamic file reference

austinghamilton

New Member
Joined
Sep 15, 2021
Messages
3
Office Version
  1. 365
Platform
  1. Windows
I need help creating a dynamic file reference in Excel (Please let me know the correct terminology as well). Currently, it is
"='[SDR2021_AFG_NN.xls]Forecast NN 29 -- T5B5 -- AFG'!C2"

I want to do something like this:
"='[SDR2021_$P$94_NN.xls]Forecast NN 29 -- T5B5 -- $P$94'!C2"

In cell P94, in the same sheet as the formula, I have entered "AFG".

Please advise.
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Hi & welcome to MrExcel.
Will the other workbook be open?
 
Upvote 0
Hi & welcome to MrExcel.
Will the other workbook be open?
Thank you for your quick reply! I was planning on having the other Excel open to avoid issues, but if you know a workaround to allow the link and the other Excel to be closed that would be even better. Please advise.
 
Upvote 0
Ok, try it like
Excel Formula:
=INDIRECT("'[SDR2021_"&P94&"_NN.xls]Forecast NN 29 -- T5B5 -- "&P94&"'!C2")
although this will not work on closed workbooks.
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,432
Messages
6,124,859
Members
449,194
Latest member
HellScout

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