You are here:

Excel/File name from a formula

Advertisement


Question
QUESTION: Hi,
How can do this?
='[1BW108-1.xls]Review'!$F$55 where 1BW108-1 is on C8.

I have a list of excel files on a folder and a column with some of the excel file names and I want to retrieve the value of F55 for all the files listed on the column.

Thanks,
Alec.

ANSWER: =indirect("'[" & C8 & ".xls]Review'!F55")

but the file must be open or you get a #REF! error

---------- FOLLOW-UP ----------

QUESTION: Nice but I could have like 150 different documents.
Do you know any other way so I don't need to open all?
I could open section by section and copy+past the values of the formula and save so I won't lose the values.
Thanks,
Alec


Answer
Assuming the other values are in C9, C10..., you can do this (follow the steps precisely):
If the ='[1BW108-1.xls]Review'!$F$55 is now in cell A1, put this in cell A1 and fill down to A150:
="='["&c8&".xls]Review'!F55"
(in A2 you should see ="='["&c9&".xls]Review'!F55"
The formula will LOOK right, but will only return the string as shown.
Select A1:A150, copy/paste special values on top of itself.
With A1:A150 selected, use edit/replace, replacing "=" with "=" (no quotes).
You should now have what you want.

HTH
About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here

All Answers

Answers by Expert:


Ask Experts

Volunteer


Bob Umlas

Expertise

I`m a Microsoft Excel MVP (Most Valuable Professional) and have been since the inception of the program in 1995. I can answer every kind of Excel question except: API, Importing/exporting to other programs (powerpoint, word,...)

Experience

Worked with MS Excel since version 0.99 (on the Mac!). Was contributing editor to Excellence Magazine, having written >300 articles. John Walkenbach said of me "I finally met someone who knows as much about Excel as I do."

Publications
Excellence, The Expert, Microsoft

Awards and Honors
MVP
Led sessions for the Convergence 2004-2006 seminar on Excel tips & tricks

©2009 About.com, a part of The New York Times Company. All rights reserved.