Return Tab Name to a Cell

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
 
A

Andy B

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.
 
G

Guest

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
 
P

Paul B

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 **
 
C

Chip Pearson

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
 
J

John T. Riordan

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top