View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Pete_UK Pete_UK is offline
external usenet poster
 
Posts: 8,856
Default Using a cell reference as a file name

You can build up your cell reference like this:

="'C:\*path name*[WO" & A1 & "-I.xls]Sheet1'!A1"

where A1 contains the six digit number. However, you won't be able to bring
the data from that cell with this formula, as it only returns the string of
text that represents the cell reference. You would normally use this with
INDIRECT like this:

=INDIRECT(text_representing_cell_ref)

but unfortunately INDIRECT will only work with files that are open, and will
return a #REF error if the file is closed.

There is a free download, morefunc, which contains INDIRECT.EXT, which is
meant to overcome this problem and will work with closed files. However, I
read last week that the site was down, and it still is when I tried it just
now.

http://longre.free.fr/english/

Not sure if this helps.

Pete

"Philster" wrote in message
...
We use work order numbers at my company. Each work order has a file by
the
name WO[6 digit number]-I.xls. I want to create a new workbook that on
the
left column has the list of the 6-digit numbers and the next column calls
up
the value of a specific cell in that work order's file. All the cells are
consistently in the same location.

I have been able to manually accomplish this with placing this in the new
workbook, sheet1, column B. Where i copy and paste the 6 numbers from the
cell in column A into this path in each cell in the B column.

='C:\*path name*[WO123456-I.xls]Sheet1'!$A$1

What I would like to see is some way to do this

='C:\*path name*[=A1]Sheet1'!$A$1

where the "A1" iterates in cells below.

I know my explaination is complicated but there must be some simple way to
do this that I am missing... Thank you in advance!