Cell refering filename in formula bar

  • Thread starter Thread starter yee ven
  • Start date Start date
Y

yee ven

How do you refer filename1 to a cell in the formula bar?
Example:

='\\Year 2004\September\[_filename1_.xls]sheet1'!$A$1

A | B | C
1 | |
2 | filename1 |
3 | |
4 | |

="\\Year 2004\September\["_B2_".xls]sheet1'!$A$1
will not work
 
Hi Yee Ven,

Just add &-chars around the ref, like this:

="\\Year 2004\September\["&B2&".xls]sheet1'!$A$1"

- Asse
 
I think the function you want to use is called =indirect().

But the bad news is it doesn't work with closed workbooks.

Harlan Grove already wrote that VBA UserDefinedFunction that will return a value
from a closed workbook (when that path/workbookname/sheetname/address is not
directly typed in:


http://www.google.com/[email protected]

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

yee said:
How do you refer filename1 to a cell in the formula bar?
Example:

='\\Year 2004\September\[_filename1_.xls]sheet1'!$A$1

A | B | C
1 | |
2 | filename1 |
3 | |
4 | |

="\\Year 2004\September\["_B2_".xls]sheet1'!$A$1
will not work.
 

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

Similar Threads


Back
Top