Return Tab Name to a Cell

  • Thread starter Thread starter John Riordan
  • Start date Start date
J

John Riordan

Does anyone know how I can have a cell's contents filled
with the name of the Worksheet, i.e. the Tab name?

I believe it must have something to do with the file
properties information.

Thank you,
John T. Riordan
 
John

To return the full filename use:

=CELL("filename")

This only works once you have saved the sheet. The "filename" bit should be
entered exactly as shown.

Andy.
 
Thanks Andy but I was looking for the tab name only, ie
Sheet 3.

Using your suggestion I could then use the Right function
to return the last certain number of characters, but what
happens when the sheet names are different lenghts?

Anything else useful that I could try?

Thanks,
John T. Riordan
 
John, if you just want the sheet, tab, name use this
=MID(CELL("filename",A2),FIND("]",CELL("filename",A2))+1,255)
as with Andy's the workbook has to be saved first
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2000 & 97
** remove news from my email address to reply by email **
 
John,

Use the following formula:

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

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
Thanks Andy, but I was looking to return only the sheet
name (tab name), ie sheet 3.

I found that I can use your function embedded in a Right
Function to return the last fixed number of characters,
but what happens when the sheet names are different
lengths?

Any more useful suggestions?

Thanks in advance,
John T. Riordan
 
Back
Top