View Single Post
  #2   Report Post  
Max
 
Posts: n/a
Default

Provided the file is open, think you could use INDIRECT

Something like in say, B1:
=INDIRECT("'["&A1&"]Sheet1'!A1")
where you have the filename in A1: file 1.xls

The above will return the same as having in B1:
=[file 1.xls]Sheet1!A1

If file 1.xls is closed, you'll get #REF! error in B1
The error will disappear once you open file 1.xls
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"dh" wrote in message
...
I think there should be a function in excel for what I am tring to do. 20
years ago when I took a little cousre in BASIC we use to call them an

array.
Here is what I am tring to do, its like linking to files but I only what

to
set up the fumula 1 time. Say I have 2 file - call them file 1 and file

2 -
am working on file 2 - I what a formula like this

=((x)sheet1!A1) and
=((x)Sheet1!A2)

where x is = to C:\file 1.xls

I only want it ienter the "link file", "array" or "x" one time so that it

is
easy to change file name in the formula but you don't have to change the
whole formula.

Does any of this make sense? Is this possible?