View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Mike McLellan Mike McLellan is offline
external usenet poster
 
Posts: 11
Default Worksheet Name Variable?

Excellent - works a treat! Many thanks

"Max" wrote:

I like & use this method (inspired by a Harlan posting)

In a pre-saved book (book must have been saved beforehand)

Click Insert Name Define
Put under "Names in workbook:": WSN
Put in the "Refers to:" box:
=MID(CELL("Filename",INDIRECT("A1")),FIND("]",CELL("Filename",INDIRECT("A1")
))+1,32)
Click OK

The above defines WSN as a name we can use to refer to the sheetname in
formulas. It will auto-extract the sheetname implicitly.

Test it out. In any sheet in the book, in any cell: =WSN
will return that particular sheet's name
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:20,500 Files:363 Subscribers:64
xdemechanik
---
"Mike McLellan" wrote:
I'm using Excel 2003 SP3 under Windows XP and want to be able to pick up the
name of a worksheet from within the sheet in question to use in populating a
string of text. Is their a system variable or some other way that enables me
to do this?