Cell returns worksheet name

  • Thread starter Thread starter Derick
  • Start date Start date
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.
 
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
 
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)
 

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

Back
Top