Dynamic Link

CPGUY33

New Member
Joined
Sep 27, 2006
Messages
9
How can I create a dynamic link to another excel file? I want the user to type in a name in cell A1 and in cell B1 it is linked to the file name typed in A1 and reads a cell value in that file. Can this be done through a function such as =[name.xls]Sheet1!C20 where "name" is what was typed in cell A1?
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
How can I create a dynamic link to another excel file? I want the user to type in a name in cell A1 and in cell B1 it is linked to the file name typed in A1 and reads a cell value in that file. Can this be done through a function such as =[name.xls]Sheet1!C20 where "name" is what was typed in cell A1?

If you can keep the target file open...

=INDIRECT("'"&A1&"Sheet1!C20")

Otherwise, download and install the morefunc.xll add-in and invoke:

=INDIRECT.EXT("'"&A1&"Sheet1!C20")
 
Upvote 0
Thanks it works great after a slight modification and downloading the morefunc.xll add-in:
=INDIRECT.EXT("'["&A1&".xls]Sheet1'!c20")

I have found that when you first type in this equation to a new sheet it gives #VALUE!. You must save and close, then reopen the sheet for the corect value/link to show up. Is this how it is supposed to work?
 
Upvote 0
Thanks it works great after a slight modification and downloading the morefunc.xll add-in:
=INDIRECT.EXT("'["&A1&".xls]Sheet1'!c20")

I have found that when you first type in this equation to a new sheet it gives #VALUE!. You must save and close, then reopen the sheet for the corect value/link to show up. Is this how it is supposed to work?

This behavior is not mentioned in Morefunc's Help. If you want to, you can post the question at:

http://xcell05.free.fr/forums/index.php
 
Upvote 0

Forum statistics

Threads
1,213,536
Messages
6,114,215
Members
448,554
Latest member
Gleisner2

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