Using Dynamic File Path to Get Cell Data

sh0rn1998

New Member
Joined
Feb 27, 2022
Messages
1
Office Version
  1. 365
Platform
  1. Windows
So I have been learning some VBA recently and noticed that I could save myself hours a day if I was able to figure out how to write this:

I have the test sheet below before I implement this at work and would like to use the "Full Folder Path" and paste that into a closed excel file. I know understand indirect can't be used for this since the work book is closed but my attempts at trying to write a macro for this doesn't seem to work (or a function for that matter). I'm using $A$1 as a reference but I will be changing that once I find what cell the data is in at work.

Would 100% appreciate any help here since I could be saving myself hours at my job pulling this data with this instead of manually opened 10-20 of these files a day to grab data.

NameFolder PathCell ReferenceDesired Info Inside The Cell?Desired Output
Sales Documentation Sheet.xlsmC:\Users\User\Desktop\VBA\$A$1C:\Users\User\Desktop\VBA\Sales Documentation Sheet.xlsm!$A$1Link to data in the cell based on other columns
Sales.xlsmC:\Users\User\Desktop\VBA\$A$1C:\Users\User\Desktop\VBA\Sales.xlsm!$A$1Link to data in the cell based on other columns
 

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.

Forum statistics

Threads
1,223,888
Messages
6,175,219
Members
452,620
Latest member
dsubash

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