Worksheet Name Variable?

M

Mike McLellan

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?
 
M

Max

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
 
M

Mike McLellan

Excellent - works a treat! Many thanks

Max said:
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 said:
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?
 

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