Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default Worksheet Name Variable?

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?
  #2   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Worksheet Name Variable?

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?

  #3   Report Post  
Posted to microsoft.public.excel.misc
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?

  #4   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Worksheet Name Variable?

Welcome. Could you take a moment to rate the response by pressing the Yes
button in the earlier response (like the one below)? Thanks.
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:20,500 Files:363 Subscribers:64
xdemechanik
---
"Mike McLellan" wrote:
Excellent - works a treat! Many thanks


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Variable Worksheet Name in Formula pdberger Excel Worksheet Functions 4 March 16th 08 12:28 AM
Link variable data from one worksheet to another worksheet? T MAT New Users to Excel 3 November 27th 07 06:46 AM
Variable worksheet name (tab) linked to cell in same worksheet azbob Excel Worksheet Functions 6 January 9th 07 06:27 PM
Looking up a variable in one worksheet and copying information from another column to another worksheet?? Brad Torken Excel Discussion (Misc queries) 2 December 10th 06 06:02 AM
Variable worksheet name Chris Excel Worksheet Functions 1 April 24th 06 05:35 PM


All times are GMT +1. The time now is 05:44 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"