File reference

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to reference data in an external workbook and would like to save
some typing. Each row has the same references, but to a different file. I
would like to just type the file name in the first cell and have each of the
following cells use that cell to get the file name and perform the function.
For instance:

='[external_file.xls]Enterprise Architecture'!$B$3

But the formula would contain some function that would get external_file.xls
from the first cell.
 
Hi

You can use INDIRECT function to create a link, of-course, but there is a
drawback - INDIRECT needs source file to be opened - otherwise it returns an
error.

When addressing by cell value is needed only for designing purpouses, then
my advice is to use this alternative technique:

Into some column, p.e. A, enter workbook names.
In another column, enter the formula like this:
="='[" & A1 & "]Sheet1'!A1"
and copy it down
Select the range with formulas. Copy, and then PasteSpecial>Values. Leaving
the range selected, replace all "=" with "=".
It's done!
 
Assuming your file name is in A1

the formula =MID(A1,FIND("[",A1)+1,FIND("]",A1)-1-FIND("[",A1))

will bring back whatever is between [ and ].

Gizmo63


Ron de Bruin said:
Try this one
http://www.rondebruin.nl/summary2.htm


--
Regards Ron de Bruin
http://www.rondebruin.nl


TJW JR said:
I am trying to reference data in an external workbook and would like to save
some typing. Each row has the same references, but to a different file. I
would like to just type the file name in the first cell and have each of the
following cells use that cell to get the file name and perform the function.
For instance:

='[external_file.xls]Enterprise Architecture'!$B$3

But the formula would contain some function that would get external_file.xls
from the first cell.
 

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

Back
Top