Tab Names

J

john anderson

I need a formula to show the tab name only in the spreadsheet. I know how to
get the file and path name, but that brings up too much information. I only
want it to display the tab name.
 
M

Max

Try in any cell:
=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,32)
(workbook must be saved first)
 
S

Stefi

=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)

It's not my intention, I found it int this forum, but Iforgot the author's
name, sorry!

Regards,
Stefi


„john anderson†ezt írta:
 
M

Max

Another alternative (Technique from a post by Harlan)
is to create a defined name say, "WSN" as per steps below,
then we could just use "WSN" to refer to the sheetname
in formulas within the book

Click Insert > Name > Define
Put under "Names in workbook:": WSN
Put in the "Refers to:" box:
=MID(CELL("Filename",INDIRECT("A1")),FIND("]",CELL("Filename",INDIRECT("A1")
))+1,32)
Click OK

[As before, the workbook must be saved first]
 
M

Max

.. then we could just use "WSN" to refer to the sheetname
in formulas within the book ..

Example:

In any sheet, putting in any cell within the sheet: =WSN
will return that sheet's tab name into the cell

Or, applied within a formula:
=VLOOKUP(WSN, ...)
 
Top