Cell value as part of a worksheet ref. in Excel

O

ones_conscience

I have a column of invoice numbers.
I have a column of names also taken from a cell on each of those invoice
worksheets
(The invoice worksheets are in another file.)
The formula to obtain the names is:
='D:\Documents and Settings\My Documents\Work\[Filename.xls]SheetName'!$E$2

How can I reference just the SheetName part of the formula to the adjacent
cell which contains the matching invoice number? (So that I can fill down
the formula without having to type it afresh for each cell.)
 
B

Bernard Liengme

Let A1 contain the first worksheet name
=INDIRECT("'D:\Documents and Settings\My Documents\Work\[Filename.xls]" & A1
& "'!$E$2")

This is INDIRECT( double-quote single-quote...... A1 & double-quote
single-quote ! .... 2 double-quote

best wishes
 
D

Dave Peterson

The function you'd want to use that's built into excel is =indirect(). But that
function returns an error if the sending workbook is closed.

If that's a problem, then Laurent Longre has an addin (morefunc.xll) at:
http://xcell05.free.fr/

That includes =indirect.ext() that may help you.

ones_conscience said:
I have a column of invoice numbers.
I have a column of names also taken from a cell on each of those invoice
worksheets
(The invoice worksheets are in another file.)
The formula to obtain the names is:
='D:\Documents and Settings\My Documents\Work\[Filename.xls]SheetName'!$E$2

How can I reference just the SheetName part of the formula to the adjacent
cell which contains the matching invoice number? (So that I can fill down
the formula without having to type it afresh for each 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

Top