Sheet name in cell

  • Thread starter Thread starter Stephen Pain
  • Start date Start date
S

Stephen Pain

Hi all,
I know it is possible as I've seen it done before, but can't remembe
how! I am looking to use the name of a worksheet (as it appears on th
tab) as the contents of a cell?

Any ideas?

Thanks,

Stev
 
one approach:

=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)
 
You can also use a user defined function

Enter this in a regular module:

Function mysheet()
mysheet = ActiveSheet.Name
End Function


Then in the cell you select enter the formula "=mysheet()"-- don't forget the "()"
 

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