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

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
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
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,717
Members
448,985
Latest member
chocbudda

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