I am trying to view the file name that I am working on in the Excel spreadsheet of interest using a formula. For example if the file was called workbook1.xlsx then I would want cell A1 to show "workbook1.xlsx"
The formula that Microsoft's help site gives doesn't work: http://office.microsoft.com/en-us/excel-help/insert-the-current-excel-file-name-path-or-worksheet-in-a-cell-HA010103010.aspx#BMinsert3
=MID(CELL("filename"),SEARCH("[",CELL("filename"))+1, SEARCH("]",CELL("filename"))-SEARCH("[",CELL("filename"))-1)
Answer
It works here, I just tested on Excel 2007 (XP) and Excel 2013 (Windows 8).
Try =CELL("filename")
alone first to help troubleshoot.
Make sure you have saved your workbook to disk. It will not show "Book1" if you put the formula in a new unsaved workbook.
Are you using non-english regional settings on your computer? Some languages requiring adjusting function names and formula syntax (in French for instance, commas must be replaced by semicolons).
Are you on your personal computer or a workplace computer? If it's a work computer, there could perhaps be user rights limitations causing issues.
When you say "it doesn't work", can you be more specific? Does it accept the formula as typed? Is the cell empty, showing "#VALUE!", etc? What happens when just using =CELL("filename")
?
No comments:
Post a Comment