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

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,209
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")
 

CPGUY33

New Member
Joined
Sep 27, 2006
Messages
9
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?
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,209
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
 

Forum statistics

Threads
1,141,219
Messages
5,705,086
Members
421,378
Latest member
CarlosDuran

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