using Indirect to create Links
Posted by Adam on November 21, 2001 10:31 AM
Hi all,
I'm trying to create a link to one of several possible workbooks using an input cell and the Indirect Function. I'm close, but the what I've got so far only works if the independant files are open.
Here's a simplified example:
I have 2 input files that are updated weekly (Sitting always on paths -> C:\InputA.xls and C:\InputB.xls). Both input files are symmetric in every way (formats, number of data points, and formulation) - all the same except for the actual data.
I also have a Summary Sheet (Summary.xls). This file has a long series of calculations/analyses/charts that are meant to be dependent on one of the Input sheet's data at a time.
I've created an input cell where the user could select (using Validation- list approach) one of the 2 input files. I currently have these choices as:
C:\'[InputA.xls]
C:\'[InputB.xls]
So somewhere on Summary.xls (let's say E1) the user selects one of the above choices.
My plan was to create a range of Indirects that would redirect the links to the file selected above. The analyses already in place would then feed off the specified data.
So far, my formula looks something like this: (for linking a cell on the summary sheet to A1 from one of the Input sheets).
=INDIRECT(E1&"Sheet1'!$A$1)
This formula does in fact give A1 from the appropriate input sheet, but only when the Input file is open. If I close the Input file the formula kicks out a #REF! error.
Anyone know if this is a limitation with Indirects? If anyone knows a workaround I would greatly appreciate any advise.
Thanks!
Adam