» 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:
- Cashflow Quadrant: Rich Dad's Guide to Financial Freedom
- Microsoft Excel 2002 Visual Basic for Applications Step by Step
- The Guide to Understanding Financial Statements
- How to Use Financial Statements: A Guide to Understanding the Numbers
- The Complete Book of Business Plans: Simple Steps to Writing a Powerful Business Plan (Small Business Sourcebooks)
- Yes, You Can Time the Market!
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

