cell equal worksheet title

O

OCA

How would I go about making a cell equal the name of the worksheet, in which
it is entered? I.e. in Sheet1, cell A1 equals 'Sheet1'? Is this possible?
 
G

Gary''s Student

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

Of course, the file must have been saved at least once.
 
D

Dave Peterson

This will return the name of the active sheet in the active workbook when excel
recalculated.

If you want the name of the worksheet that contains the formula, you'll want to
include a cell reference like Gary's Student suggested.

muddan said:
this one

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

OCA said:
How would I go about making a cell equal the name of the worksheet, in which
it is entered? I.e. in Sheet1, cell A1 equals 'Sheet1'? Is this possible?
 

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