Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default renaming sheets dinamically


Hi all.

In my spreadsheet, I'd like to have some sheets (not all) which name is
dependent from the value of a cell inthe main sheet..
For example,
if cell A1 of sheet "Main" is equal to "Stage 1",
I'd like to have another sheet to be named "summary for Stage 1"..
if I'd change the A1 cell in "Stage A", then the sheet name should
change in "summary for Stage A"
I think I need a macro for this, but I don't know where to start
from..
any help is really appreciated..
thanks


--
pimar
------------------------------------------------------------------------
pimar's Profile: http://www.excelforum.com/member.php...fo&userid=5386
View this thread: http://www.excelforum.com/showthread...hreadid=474385

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default renaming sheets dinamically


Thank you, Norman
I'll try it and let you know ...
*pimar


--
pimar
------------------------------------------------------------------------
pimar's Profile: http://www.excelforum.com/member.php...fo&userid=5386
View this thread: http://www.excelforum.com/showthread...hreadid=474385

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default renaming sheets dinamically


Norman,
it works fine, great.
Could you help me to make it more flexible, since I'm not very familiar
with this scripting?
In sense that I need to rename more than 1 sheet based on a range of
values..
These are the changes I need to make (see my comments)

Private Sub Worksheet_Change(ByVal Target As Range)
Dim rng As Range
Const sStr As String = "Summary for "

// Range is from A1 to A4
Set rng = Range("A1","A2","A3","A4")

On Error Resume Next
For count=0 to 3 //4 sheets to rename

If Not Intersect(Target, rng) Is Nothing Then
If Not IsEmpty(rng) Then
// Question: how can I "combine" the name of the sheet based on value
of count
Sheet???.Name = sStr & rng.Value
End If
End If
End For

On Error GoTo 0

End Sub

Thanks very much for your help..
pimar


--
pimar
------------------------------------------------------------------------
pimar's Profile: http://www.excelforum.com/member.php...fo&userid=5386
View this thread: http://www.excelforum.com/showthread...hreadid=474385

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
Renaming Sheets Accor Excel Discussion (Misc queries) 6 August 15th 08 04:43 PM
Renaming Sheets automatically Tami[_4_] Excel Programming 2 July 26th 04 02:32 PM
Renaming sheets Adri[_2_] Excel Programming 5 April 5th 04 10:09 PM
Renaming Sheets in a workbook Cameron MacRae Excel Programming 2 December 18th 03 11:19 PM
renaming sheets Jeremy Excel Programming 2 November 28th 03 04:46 PM


All times are GMT +1. The time now is 07:10 PM.

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"