» 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:
- The Basics of Finance: Financial Tools for Non Financial Managers
- Microsoft Access 2002 for Dummies
- Lower Your Taxes - Big Time! : Wealth-Building, Tax Reduction Secrets from an IRS Insider
- Investments + S&P Card + Powerweb + StockTrak discount coupon
- Microsoft Word Version 2002 Inside Out
- Accounting Principles, with CD, 6th Edition
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

