» Cell Function Returns Sheet Name, Workbook Name and Path
CATEGORY - Excel Tools
VERSION - All Microsoft Excel Versions
To get the sheet name:
=MID(CELL("filename"),FIND("]",CELL("filename"))+1,255)
To get the workbook name:
=MID(CELL("filename"),FIND("[",CELL("filename"))+1,(FIND("]",CELL("filename"))+1)-FIND("[",CELL("filename"))-2)
To get the path address & workbook name:
=CELL("filename")
To get the path address:
=MID(CELL("filename"),1,FIND("[",CELL("filename"))-1)

Book Store:
Recommended Books:
- Accounting Principles, with CD, 6th Edition
- Special Edition Using Microsoft Excel 2002
- Windows XP Annoyances
- Good to Great: Why Some Companies Make the Leap... and Others Don't
- Successful Business Planning in 30 Days: A Step-By-Step Guide for Writing a Business Plan and Starting Your Own Business
- Marketing Plan: A Handbook with Marketing Plan
Nice but...
I notice that if you have multiple sheets and you enter this formula on them, then all sheets have the same value as the last time you ran the formula...
Very much Interesting
Ganesh Dabholkar-INDIA Mumbai
I really appreciate, by your Excel tips.
From past 3 months I am trying for the same.
Once again Thanks for the same
RE: Nice but...
If you add a cell reference to the first CELL function like this:
=MID(CELL("filename",A1),FIND("]",CELL("filename"))+1,255) it will reference the current sheet instead of the sheet you were in the last time you ran the formula.
Wonderful !
venkat
suggestions on Formating cells are most welcome. Also tell us more formulaes, esp: on VLOOKUP.
Also note if you only have one sheet...
Chief~Plasma
If you only have one sheet then the finds for [ and ] will fail and you will get #value!.
Regards,
-cp

