Use a cell to name a file to be opened.

M

Michael

I want to use the contents of a cell as part of an INDEX lookup. The
contents of the cell would indicate the name of the file I want to open. Any
ideas?
 
J

Jarek Kujawa

e.g.

=INDIRECT('C:\Documents and Settings\[&A1&".xls]Bonds'!$H$6")

where A1=Somefile

will retrieve data from file "Somefile.xls" stored in C:\Documents and
Settings\, from cell H6 in worksheet named "Bonds"
 
D

Dave Peterson

It's not =index() that has trouble with closed files.

=indirect() has trouble with closed files.



Jarek said:
e.g.

=INDIRECT('C:\Documents and Settings\[&A1&".xls]Bonds'!$H$6")

where A1=Somefile

will retrieve data from file "Somefile.xls" stored in C:\Documents and
Settings\, from cell H6 in worksheet named "Bonds"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top