Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jared
 
Posts: n/a
Default How to change a tab name with cell reference and formula?

I would like to automatically change a tab's name from cell A1 but the
problem starts because cell A1 is in reference from a different sheet so it
automatically changes and i don't input it manually. All tries i made worked
only manually using the VBA.

Cell A1 inputs: =""&Intro!A3&" 7"
How can i change Cell "A3" in Sheet "Intro" So the tab's name will change
accordingly?

Thanks, Jared
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gary L Brown
 
Posts: n/a
Default How to change a tab name with cell reference and formula?

You're going to have to put some VBA code in the worksheet who's name you
want to keep changing.

Because you will be changing the name of the worksheet, you obviously can't
refer to the worksheet name in your code. BUT, besides the name that you see
on the tab, when you go into the Visual Basic Editor (VBE)
[ToolsMacroVisual Basic Editor] and look in the Project Window on the left
side of the screen, you will see something like...
Sheet2(Info). 'Sheet2' is the REAL name of the worksheet.

Now, take a look at the REAL sheet name of the worksheet who's name you want
to keep changing. For this example, let's assume the REAL name is 'Sheet1'
and the tab name is 'Shmoe'.

1) Highlight and double-click on the worksheet Sheet1(Shmoe) in the Project
Window.
2) In the code window to the right of the Project Window, you will see two
drop-down boxes. The one on the left will say (General) and the one on the
right will say (Declarations).
3) Pull down the (General) drop-down box and choose 'Worksheet'.
4) Pull down the (Declarations) drop-down box and choose 'Calculate'. Your
cursor will now be blinking inside a procedure called 'Private Sub
Worksheet_Calculate()'.
5) Type the 2 lines...
On error resume next
Sheet1.Name = Range("A1").Value

Now, whenever the sheet is calculated, either automatically or using 'F9',
'Shmoe' will look in A1 and change it's name to that value.
Note: It won't work if another worksheet already has the name that you put
in A1.

HTH,
--
Gary Brown

If this post was helpful, please click the ''Yes'' button next to ''Was this
Post Helpfull to you?''.


"Jared" wrote:

I would like to automatically change a tab's name from cell A1 but the
problem starts because cell A1 is in reference from a different sheet so it
automatically changes and i don't input it manually. All tries i made worked
only manually using the VBA.

Cell A1 inputs: =""&Intro!A3&" 7"
How can i change Cell "A3" in Sheet "Intro" So the tab's name will change
accordingly?

Thanks, Jared

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jared
 
Posts: n/a
Default How to change a tab name with cell reference and formula?

Absolutly Amazing.

Thanks so much.

It worked!!!


"Gary L Brown" wrote:

You're going to have to put some VBA code in the worksheet who's name you
want to keep changing.

Because you will be changing the name of the worksheet, you obviously can't
refer to the worksheet name in your code. BUT, besides the name that you see
on the tab, when you go into the Visual Basic Editor (VBE)
[ToolsMacroVisual Basic Editor] and look in the Project Window on the left
side of the screen, you will see something like...
Sheet2(Info). 'Sheet2' is the REAL name of the worksheet.

Now, take a look at the REAL sheet name of the worksheet who's name you want
to keep changing. For this example, let's assume the REAL name is 'Sheet1'
and the tab name is 'Shmoe'.

1) Highlight and double-click on the worksheet Sheet1(Shmoe) in the Project
Window.
2) In the code window to the right of the Project Window, you will see two
drop-down boxes. The one on the left will say (General) and the one on the
right will say (Declarations).
3) Pull down the (General) drop-down box and choose 'Worksheet'.
4) Pull down the (Declarations) drop-down box and choose 'Calculate'. Your
cursor will now be blinking inside a procedure called 'Private Sub
Worksheet_Calculate()'.
5) Type the 2 lines...
On error resume next
Sheet1.Name = Range("A1").Value

Now, whenever the sheet is calculated, either automatically or using 'F9',
'Shmoe' will look in A1 and change it's name to that value.
Note: It won't work if another worksheet already has the name that you put
in A1.

HTH,
--
Gary Brown

If this post was helpful, please click the ''Yes'' button next to ''Was this
Post Helpfull to you?''.


"Jared" wrote:

I would like to automatically change a tab's name from cell A1 but the
problem starts because cell A1 is in reference from a different sheet so it
automatically changes and i don't input it manually. All tries i made worked
only manually using the VBA.

Cell A1 inputs: =""&Intro!A3&" 7"
How can i change Cell "A3" in Sheet "Intro" So the tab's name will change
accordingly?

Thanks, Jared

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jared
 
Posts: n/a
Default How to change a tab name with cell reference and formula?

After trying this out it seemed to me now that every little change that
happens in the sheet, it starts to caluclate. The problem is that it is too
much calculation power for the machine. Sometimes the systems crashes of
overload or it takes more than a while for it to accept input.

Do you have another way of doing this with a more specific method?
or actually creating a macro for doing it?

Thanks again
Jared

"Gary L Brown" wrote:

You're going to have to put some VBA code in the worksheet who's name you
want to keep changing.

Because you will be changing the name of the worksheet, you obviously can't
refer to the worksheet name in your code. BUT, besides the name that you see
on the tab, when you go into the Visual Basic Editor (VBE)
[ToolsMacroVisual Basic Editor] and look in the Project Window on the left
side of the screen, you will see something like...
Sheet2(Info). 'Sheet2' is the REAL name of the worksheet.

Now, take a look at the REAL sheet name of the worksheet who's name you want
to keep changing. For this example, let's assume the REAL name is 'Sheet1'
and the tab name is 'Shmoe'.

1) Highlight and double-click on the worksheet Sheet1(Shmoe) in the Project
Window.
2) In the code window to the right of the Project Window, you will see two
drop-down boxes. The one on the left will say (General) and the one on the
right will say (Declarations).
3) Pull down the (General) drop-down box and choose 'Worksheet'.
4) Pull down the (Declarations) drop-down box and choose 'Calculate'. Your
cursor will now be blinking inside a procedure called 'Private Sub
Worksheet_Calculate()'.
5) Type the 2 lines...
On error resume next
Sheet1.Name = Range("A1").Value

Now, whenever the sheet is calculated, either automatically or using 'F9',
'Shmoe' will look in A1 and change it's name to that value.
Note: It won't work if another worksheet already has the name that you put
in A1.

HTH,
--
Gary Brown

If this post was helpful, please click the ''Yes'' button next to ''Was this
Post Helpfull to you?''.


"Jared" wrote:

I would like to automatically change a tab's name from cell A1 but the
problem starts because cell A1 is in reference from a different sheet so it
automatically changes and i don't input it manually. All tries i made worked
only manually using the VBA.

Cell A1 inputs: =""&Intro!A3&" 7"
How can i change Cell "A3" in Sheet "Intro" So the tab's name will change
accordingly?

Thanks, Jared

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
Change the work sheet name in a formula by using cell reference Neel Excel Worksheet Functions 1 June 12th 06 09:24 AM
Cell reference in different worksheet in formula Robb Excel Worksheet Functions 1 May 30th 06 06:52 PM
Possible Lookup Table Karen Excel Worksheet Functions 5 June 8th 05 09:43 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 07:48 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 09:50 AM.

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

About Us

"It's about Microsoft Excel"