Cell returns worksheet name

D

Derick

Hi.

There's got to be a function for this.

How can I get a cell to return the name of the current worksheet?

This would be ideal for groupeding worksheets, creating your work, and then,
once ungrouped, having the sheet name apear in a cell on that particular
sheet.

Thank you for any help on this.
 
M

Mike

Derick said:
Hi.

There's got to be a function for this.

How can I get a cell to return the name of the current worksheet?

This would be ideal for groupeding worksheets, creating your work, and then,
once ungrouped, having the sheet name apear in a cell on that particular
sheet.

Thank you for any help on this.


Derick,

One way to do this would be to strip the sheet name out of
CELL("filename"). Try:

=RIGHT(CELL("filename"),LEN(CELL("filename"))-FIND("]",CELL("filename"
)))


Hope this helps,

Mike
 
B

Bob Phillips

File path and file 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("fi
lename",A1),1)-FIND("[",CELL("filename",A1),1)-1)

The sheet name
=RIGHT(CELL("filename",A1),LEN(CELL("filename",A1))-FIND("]",CELL("filename"
,A1),1))



--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Top