#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 13
Default Worksheet tab name

Excel 2003 on XP.
What is the syntax to return the worksheet tab name in a cell?
What I am after is when I rename a worksheet at the tab, I wont this
reflected in a cell on that worksheet.
Or is it possible that when I copy a previous worksheet, a cell
automatically creates a new sequential number, ie if the latest number is 15
(that is a tab is named 15 an a cell reflects this number) if I copy this
worksheet (or any other in this file) the cell changes to 16, and I obviously
would want the Tab to be renamed 16 as well.

Make sense?
Many thanks
DeanH
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 896
Default Worksheet tab name

use CELL function
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Worksheet tab name

See http://www.xldynamic.com/source/xld.xlFAQ0002.html

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"DeanH" wrote in message
...
Excel 2003 on XP.
What is the syntax to return the worksheet tab name in a cell?
What I am after is when I rename a worksheet at the tab, I wont this
reflected in a cell on that worksheet.
Or is it possible that when I copy a previous worksheet, a cell
automatically creates a new sequential number, ie if the latest number is
15
(that is a tab is named 15 an a cell reflects this number) if I copy this
worksheet (or any other in this file) the cell changes to 16, and I
obviously
would want the Tab to be renamed 16 as well.

Make sense?
Many thanks
DeanH



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Worksheet tab name

Hi,

Sheet name
=MID(CELL("filename"),FIND("]",CELL("filename"))+1,255)
The workbook must be saved for this to work

Mike

"DeanH" wrote:

Excel 2003 on XP.
What is the syntax to return the worksheet tab name in a cell?
What I am after is when I rename a worksheet at the tab, I wont this
reflected in a cell on that worksheet.
Or is it possible that when I copy a previous worksheet, a cell
automatically creates a new sequential number, ie if the latest number is 15
(that is a tab is named 15 an a cell reflects this number) if I copy this
worksheet (or any other in this file) the cell changes to 16, and I obviously
would want the Tab to be renamed 16 as well.

Make sense?
Many thanks
DeanH

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Worksheet tab name

This formula will return the name of the worksheet that is active when excel
recalculates--not the name of the worksheet that contains the cell with the
formula.

Mike H wrote:

Hi,

Sheet name
=MID(CELL("filename"),FIND("]",CELL("filename"))+1,255)
The workbook must be saved for this to work

Mike

"DeanH" wrote:

Excel 2003 on XP.
What is the syntax to return the worksheet tab name in a cell?
What I am after is when I rename a worksheet at the tab, I wont this
reflected in a cell on that worksheet.
Or is it possible that when I copy a previous worksheet, a cell
automatically creates a new sequential number, ie if the latest number is 15
(that is a tab is named 15 an a cell reflects this number) if I copy this
worksheet (or any other in this file) the cell changes to 16, and I obviously
would want the Tab to be renamed 16 as well.

Make sense?
Many thanks
DeanH


--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 13
Default Worksheet tab name

Spot on, fantastic.
I also have noticed that this cell will update once you have done another
edit anywhere in the sheet or workbook, without a save being done.
Many thanks, have a great weekend
DeanH


"Mike H" wrote:

Hi,

Sheet name
=MID(CELL("filename"),FIND("]",CELL("filename"))+1,255)
The workbook must be saved for this to work

Mike

"DeanH" wrote:

Excel 2003 on XP.
What is the syntax to return the worksheet tab name in a cell?
What I am after is when I rename a worksheet at the tab, I wont this
reflected in a cell on that worksheet.
Or is it possible that when I copy a previous worksheet, a cell
automatically creates a new sequential number, ie if the latest number is 15
(that is a tab is named 15 an a cell reflects this number) if I copy this
worksheet (or any other in this file) the cell changes to 16, and I obviously
would want the Tab to be renamed 16 as well.

Make sense?
Many thanks
DeanH

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 13
Default Worksheet tab name

Spot on, the extra A1 reference helps.

"Bob Phillips" wrote:

See http://www.xldynamic.com/source/xld.xlFAQ0002.html

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"DeanH" wrote in message
...
Excel 2003 on XP.
What is the syntax to return the worksheet tab name in a cell?
What I am after is when I rename a worksheet at the tab, I wont this
reflected in a cell on that worksheet.
Or is it possible that when I copy a previous worksheet, a cell
automatically creates a new sequential number, ie if the latest number is
15
(that is a tab is named 15 an a cell reflects this number) if I copy this
worksheet (or any other in this file) the cell changes to 16, and I
obviously
would want the Tab to be renamed 16 as well.

Make sense?
Many thanks
DeanH




  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Worksheet tab name

Yes I know that. The OP asked

What I am after is when I rename a worksheet at the tab, I wont this
reflected in a cell on that worksheet.


Given that renaming a sheet causes re-calculation and that the sheet will be
active when it is renamed I think it does what the OP asked.

Mike

"Dave Peterson" wrote:

This formula will return the name of the worksheet that is active when excel
recalculates--not the name of the worksheet that contains the cell with the
formula.

Mike H wrote:

Hi,

Sheet name
=MID(CELL("filename"),FIND("]",CELL("filename"))+1,255)
The workbook must be saved for this to work

Mike

"DeanH" wrote:

Excel 2003 on XP.
What is the syntax to return the worksheet tab name in a cell?
What I am after is when I rename a worksheet at the tab, I wont this
reflected in a cell on that worksheet.
Or is it possible that when I copy a previous worksheet, a cell
automatically creates a new sequential number, ie if the latest number is 15
(that is a tab is named 15 an a cell reflects this number) if I copy this
worksheet (or any other in this file) the cell changes to 16, and I obviously
would want the Tab to be renamed 16 as well.

Make sense?
Many thanks
DeanH


--

Dave Peterson

  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,358
Default Worksheet tab name

Instead of that, you could just type the value into a cell, and use VBA
coding to change the tab name....
Assuming cell A1 is where you want your Tab name to appear.
Right click on tab, View Code, and insert the following code:

Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Address = "$A$1" Then ActiveSheet.Name = Target

End Sub



--
John C


"DeanH" wrote:

Excel 2003 on XP.
What is the syntax to return the worksheet tab name in a cell?
What I am after is when I rename a worksheet at the tab, I wont this
reflected in a cell on that worksheet.
Or is it possible that when I copy a previous worksheet, a cell
automatically creates a new sequential number, ie if the latest number is 15
(that is a tab is named 15 an a cell reflects this number) if I copy this
worksheet (or any other in this file) the cell changes to 16, and I obviously
would want the Tab to be renamed 16 as well.

Make sense?
Many thanks
DeanH

  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 13
Default Worksheet tab name

I will be passing this file onto another user and I don't want them to have
to use VBA, which I am sure they are most appreciatative of ;-)
The previous posting with the kb link works beautifully.
Thanks for the answer though. Have a great weekend.
DeanH

"John C" wrote:

Instead of that, you could just type the value into a cell, and use VBA
coding to change the tab name....
Assuming cell A1 is where you want your Tab name to appear.
Right click on tab, View Code, and insert the following code:

Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Address = "$A$1" Then ActiveSheet.Name = Target

End Sub



--
John C


"DeanH" wrote:

Excel 2003 on XP.
What is the syntax to return the worksheet tab name in a cell?
What I am after is when I rename a worksheet at the tab, I wont this
reflected in a cell on that worksheet.
Or is it possible that when I copy a previous worksheet, a cell
automatically creates a new sequential number, ie if the latest number is 15
(that is a tab is named 15 an a cell reflects this number) if I copy this
worksheet (or any other in this file) the cell changes to 16, and I obviously
would want the Tab to be renamed 16 as well.

Make sense?
Many thanks
DeanH



  #11   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,358
Default Worksheet tab name

Anytime. FYI, once you post the VBA, they don't have to do anything with it.
It will always activate when the cell with the tab reference is modified,
with no extra actions other than typing into the cell by the user. Don't even
have to right click on your tab :)
--
John C


"DeanH" wrote:

I will be passing this file onto another user and I don't want them to have
to use VBA, which I am sure they are most appreciatative of ;-)
The previous posting with the kb link works beautifully.
Thanks for the answer though. Have a great weekend.
DeanH

"John C" wrote:

Instead of that, you could just type the value into a cell, and use VBA
coding to change the tab name....
Assuming cell A1 is where you want your Tab name to appear.
Right click on tab, View Code, and insert the following code:

Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Address = "$A$1" Then ActiveSheet.Name = Target

End Sub



--
John C


"DeanH" wrote:

Excel 2003 on XP.
What is the syntax to return the worksheet tab name in a cell?
What I am after is when I rename a worksheet at the tab, I wont this
reflected in a cell on that worksheet.
Or is it possible that when I copy a previous worksheet, a cell
automatically creates a new sequential number, ie if the latest number is 15
(that is a tab is named 15 an a cell reflects this number) if I copy this
worksheet (or any other in this file) the cell changes to 16, and I obviously
would want the Tab to be renamed 16 as well.

Make sense?
Many thanks
DeanH

  #12   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 13
Default Worksheet tab name

That is very true but I have found that most of our PCs are set up with
secuirty high and they always winge about the Accept macro warning when
opening files.
Never mind.

"John C" wrote:

Anytime. FYI, once you post the VBA, they don't have to do anything with it.
It will always activate when the cell with the tab reference is modified,
with no extra actions other than typing into the cell by the user. Don't even
have to right click on your tab :)
--
John C


"DeanH" wrote:

I will be passing this file onto another user and I don't want them to have
to use VBA, which I am sure they are most appreciatative of ;-)
The previous posting with the kb link works beautifully.
Thanks for the answer though. Have a great weekend.
DeanH

"John C" wrote:

Instead of that, you could just type the value into a cell, and use VBA
coding to change the tab name....
Assuming cell A1 is where you want your Tab name to appear.
Right click on tab, View Code, and insert the following code:

Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Address = "$A$1" Then ActiveSheet.Name = Target

End Sub



--
John C


"DeanH" wrote:

Excel 2003 on XP.
What is the syntax to return the worksheet tab name in a cell?
What I am after is when I rename a worksheet at the tab, I wont this
reflected in a cell on that worksheet.
Or is it possible that when I copy a previous worksheet, a cell
automatically creates a new sequential number, ie if the latest number is 15
(that is a tab is named 15 an a cell reflects this number) if I copy this
worksheet (or any other in this file) the cell changes to 16, and I obviously
would want the Tab to be renamed 16 as well.

Make sense?
Many thanks
DeanH

  #13   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Worksheet tab name

It'll return the name of the sheet that's active when excel recalculates.

The activesheet isn't always the one with that formula.

Try this:

Start a new workbook
Make sure it has multiple worksheets (say 3)
window|new window (twice)
window|arrange|tiled
Save the workbook
Put your formula in A1 of each of the worksheets.

And recalculate.

I don't think that this is what the OP wants.

(You can also see the same effect when a different workbook is active.)


Mike H wrote:

Yes I know that. The OP asked

What I am after is when I rename a worksheet at the tab, I wont this
reflected in a cell on that worksheet.


Given that renaming a sheet causes re-calculation and that the sheet will be
active when it is renamed I think it does what the OP asked.

Mike

"Dave Peterson" wrote:

This formula will return the name of the worksheet that is active when excel
recalculates--not the name of the worksheet that contains the cell with the
formula.

Mike H wrote:

Hi,

Sheet name
=MID(CELL("filename"),FIND("]",CELL("filename"))+1,255)
The workbook must be saved for this to work

Mike

"DeanH" wrote:

Excel 2003 on XP.
What is the syntax to return the worksheet tab name in a cell?
What I am after is when I rename a worksheet at the tab, I wont this
reflected in a cell on that worksheet.
Or is it possible that when I copy a previous worksheet, a cell
automatically creates a new sequential number, ie if the latest number is 15
(that is a tab is named 15 an a cell reflects this number) if I copy this
worksheet (or any other in this file) the cell changes to 16, and I obviously
would want the Tab to be renamed 16 as well.

Make sense?
Many thanks
DeanH


--

Dave Peterson


--

Dave Peterson
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
Unable to Insert Worksheet/Move and copy worksheet Excel 2003 lukerush Excel Worksheet Functions 2 September 7th 06 05:05 PM
plot graph from multiple worksheet as embedded chart object on every worksheet [email protected] Charts and Charting in Excel 3 August 24th 06 07:26 PM
plot graph from multiple worksheet as embedded chart object on every worksheet [email protected] Excel Worksheet Functions 2 August 24th 06 05:26 PM
plot graph from multiple worksheet as embedded chart object on every worksheet jeftiong New Users to Excel 0 August 23rd 06 01:50 PM
Upload multiple text files into 1 excel worksheet + put the filename as the first column in the worksheet Aster Excel Worksheet Functions 3 March 12th 06 09:58 AM


All times are GMT +1. The time now is 11:17 AM.

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"