The following is taken from:
http://www.xldynamic.com/source/xld.xlFAQ0002.html
File path, file and worksheet name:
=CELL("filename",A1)
File path only:
=LEFT(CELL("filename",A1),FIND("[",CELL("filename",A1),1)-1)
File name only:
=MID(CELL("filename",A1),FIND("[",CELL("filename",A1),1)+1,FIND("]",CELL("filename",A1),1)-FIND("[",CELL("filename",A1),1)-1)
The sheet name:
=MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255)
Restrictions
This technique only works for workbooks that have been saved, at least once.
BTW: it is a worksheet that has a name; the tab is the thingme (technical
term) you use to open a worksheet.
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email
"Paul W Smith" wrote in message
...
Is there a way of displaying the tab name in a cell?
PWS