Formula Link to external Workbooks Problem

cmscriven

New Member
Joined
Sep 26, 2006
Messages
3
Hi

My first post (I registered as this is driving me mad).

I want to insert a variable (i.e. cell data) within a formula that points at a cell in an external workbook. I am aware that you need to put the full path and apostrophes in the formula and it works fine if typed in fully such as ='c:\dir1\dir2\dir3\[file.xls]UserData'!A1. The A1 ref will vary depending on which cell i want the data from.
My problem is that I want to replace the path & file information with variable path & file info held in a suitable cell in the main workbook (I have all the relevant directory & path information available) but I can find no way of introducing the data into the formula without getting the dreaded REF#. I have tried using INDIRECT but this only works when the workbooks are open which is not practical for my usage. I have a feeling this is not possible but I thought I'd give the experts a go. It seems like such a simple thing to do!

Thanks
 

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

Richard Schollar

MrExcel MVP
Joined
Apr 19, 2005
Messages
23,707
Hi Chris

You'd have to do it via a macro (you could record a macro of you changing the source of external links to show you the code you'd need).

Richard
 

Forum statistics

Threads
1,136,366
Messages
5,675,355
Members
419,565
Latest member
Phil57

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
Top