VBA/Formula to reference a Closed Workbook, based on a Dynamic cell reference in current workbook

SirGruffles

New Member
Joined
Jul 23, 2018
Messages
26
Hello!

I'm trying to make a dynamic reference to a closed workbook in my report.

Currently, a straight-up hardcoded link looks like this:
='G:\Reports\Management Reporter\[India Trial Balance 2023 in US dollars v2.xlsx]ManagementReporterISbymonth'!J16

My goal is to have the bolded part be dynamically changeable.
I want the bolded part to be referenced to what is in cell B4 on my worksheet.
It doesn't work but I'm looking for something akin to:
='G:\Reports\Management Reporter\[B4]ManagementReporterISbymonth'!J16

Is this possible?

Thank you very much for any help! <3
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Try:
Excel Formula:
=INDIRECT("'G:\Reports\Management Reporter\[" & B4 & "]ManagementReporterISbymonth'!J16")

Consider that INDIRECT is a volatile function, if you close the book of the reference the #REF error will appear in the cell
 
Upvote 0
Try:
Excel Formula:
=INDIRECT("'G:\Reports\Management Reporter\[" & B4 & "]ManagementReporterISbymonth'!J16")

Consider that INDIRECT is a volatile function, if you close the book of the reference the #REF error will appear in the cell
My goal is to not require the user to have these spreadsheets open, and to be able to reference them while closed :/
But thanks for the reply!
 
Upvote 0
Update: I've got it kind of working....but I keep getting the "Update Values" pop-up, and it doesn't seem to identify my NamedRange as my reference.
1690490099134.png


I've named the range officially CurrentIndia in NameManager:
1690490136523.png


But everytime I edit the formula or re-confirm it, the Update Values window pops up everytime, and I have to manually select the file I have listed under CurrentIndia.
Is there a way for this reference to be pulled automatically so my end user doesn't need to select the file in the window?

Thanks!
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,213
Members
452,618
Latest member
Tam84

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