PC Review


Reply
Thread Tools Rate Thread

Auto renaming of Worksheets?

 
 
Chris Mitchell
Guest
Posts: n/a
 
      22nd Feb 2007
What I want to do is set up a Workbook with Sheets N01 - N30, and have an
index Sheet such that when N01 in the index is overtyped with 'Fred'
Worksheet N01 is renamend 'Fred'. This way I can set up formulae etc which
will auto update as and when Sheet names are updated. Is this possible?

An earlier reply by Bondi (Thanks Bondi) pointed to
http://www.ozgrid.com/Excel/variable...heet-names.htm, but either I'm not
reading this right or it's not quite what I need.

TIA.

Chris.


 
Reply With Quote
 
 
 
 
Don Guillett
Guest
Posts: n/a
 
      22nd Feb 2007
If you used the macro I provided to get an index and you had a title in row
1 then

Sub listsheets()
For i = 1 To Worksheets.Count
Cells(i + 1, "a") = Sheets(i).Name
Next i
End Sub

right click sheet tab>view code>insert this. A change to the listed name
will now chg the sheet name.
I would run my original macro before in case you have moved sheets.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column <> 1 Then Exit Sub
Sheets(Target.Row - 1).Name = Target
End Sub

--
Don Guillett
SalesAid Software
(E-Mail Removed)
"Chris Mitchell" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> What I want to do is set up a Workbook with Sheets N01 - N30, and have an
> index Sheet such that when N01 in the index is overtyped with 'Fred'
> Worksheet N01 is renamend 'Fred'. This way I can set up formulae etc
> which will auto update as and when Sheet names are updated. Is this
> possible?
>
> An earlier reply by Bondi (Thanks Bondi) pointed to
> http://www.ozgrid.com/Excel/variable...heet-names.htm, but either I'm
> not reading this right or it's not quite what I need.
>
> TIA.
>
> Chris.
>



 
Reply With Quote
 
Chris Mitchell
Guest
Posts: n/a
 
      22nd Feb 2007
Thanks Don.

Our most recent posting must have passed each other in the ether.

"Don Guillett" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> If you used the macro I provided to get an index and you had a title in
> row 1 then
>
> Sub listsheets()
> For i = 1 To Worksheets.Count
> Cells(i + 1, "a") = Sheets(i).Name
> Next i
> End Sub
>
> right click sheet tab>view code>insert this. A change to the listed name
> will now chg the sheet name.
> I would run my original macro before in case you have moved sheets.
>
> Private Sub Worksheet_Change(ByVal Target As Range)
> If Target.Column <> 1 Then Exit Sub
> Sheets(Target.Row - 1).Name = Target
> End Sub
>
> --
> Don Guillett
> SalesAid Software
> (E-Mail Removed)
> "Chris Mitchell" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> What I want to do is set up a Workbook with Sheets N01 - N30, and have an
>> index Sheet such that when N01 in the index is overtyped with 'Fred'
>> Worksheet N01 is renamend 'Fred'. This way I can set up formulae etc
>> which will auto update as and when Sheet names are updated. Is this
>> possible?
>>
>> An earlier reply by Bondi (Thanks Bondi) pointed to
>> http://www.ozgrid.com/Excel/variable...heet-names.htm, but either I'm
>> not reading this right or it's not quite what I need.
>>
>> TIA.
>>
>> Chris.
>>

>
>



 
Reply With Quote
 
Don Guillett
Guest
Posts: n/a
 
      22nd Feb 2007
You really should stay in the ORIGINAL thread. Send me (address below) your
workbook if you like.

--
Don Guillett
SalesAid Software
(E-Mail Removed)
"Chris Mitchell" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Thanks Don.
>
> Our most recent posting must have passed each other in the ether.
>
> "Don Guillett" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> If you used the macro I provided to get an index and you had a title in
>> row 1 then
>>
>> Sub listsheets()
>> For i = 1 To Worksheets.Count
>> Cells(i + 1, "a") = Sheets(i).Name
>> Next i
>> End Sub
>>
>> right click sheet tab>view code>insert this. A change to the listed name
>> will now chg the sheet name.
>> I would run my original macro before in case you have moved sheets.
>>
>> Private Sub Worksheet_Change(ByVal Target As Range)
>> If Target.Column <> 1 Then Exit Sub
>> Sheets(Target.Row - 1).Name = Target
>> End Sub
>>
>> --
>> Don Guillett
>> SalesAid Software
>> (E-Mail Removed)
>> "Chris Mitchell" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> What I want to do is set up a Workbook with Sheets N01 - N30, and have
>>> an index Sheet such that when N01 in the index is overtyped with 'Fred'
>>> Worksheet N01 is renamend 'Fred'. This way I can set up formulae etc
>>> which will auto update as and when Sheet names are updated. Is this
>>> possible?
>>>
>>> An earlier reply by Bondi (Thanks Bondi) pointed to
>>> http://www.ozgrid.com/Excel/variable...heet-names.htm, but either I'm
>>> not reading this right or it's not quite what I need.
>>>
>>> TIA.
>>>
>>> Chris.
>>>

>>
>>

>
>



 
Reply With Quote
 
Chris Mitchell
Guest
Posts: n/a
 
      23rd Feb 2007
Thanks for the offer Don, I've sent the file to you.

"Don Guillett" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> You really should stay in the ORIGINAL thread. Send me (address below)
> your workbook if you like.
>
> --
> Don Guillett
> SalesAid Software
> (E-Mail Removed)
> "Chris Mitchell" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Thanks Don.
>>
>> Our most recent posting must have passed each other in the ether.
>>
>> "Don Guillett" <(E-Mail Removed)> wrote in message
>> news:%(E-Mail Removed)...
>>> If you used the macro I provided to get an index and you had a title in
>>> row 1 then
>>>
>>> Sub listsheets()
>>> For i = 1 To Worksheets.Count
>>> Cells(i + 1, "a") = Sheets(i).Name
>>> Next i
>>> End Sub
>>>
>>> right click sheet tab>view code>insert this. A change to the listed name
>>> will now chg the sheet name.
>>> I would run my original macro before in case you have moved sheets.
>>>
>>> Private Sub Worksheet_Change(ByVal Target As Range)
>>> If Target.Column <> 1 Then Exit Sub
>>> Sheets(Target.Row - 1).Name = Target
>>> End Sub
>>>
>>> --
>>> Don Guillett
>>> SalesAid Software
>>> (E-Mail Removed)
>>> "Chris Mitchell" <(E-Mail Removed)> wrote in
>>> message news:(E-Mail Removed)...
>>>> What I want to do is set up a Workbook with Sheets N01 - N30, and have
>>>> an index Sheet such that when N01 in the index is overtyped with 'Fred'
>>>> Worksheet N01 is renamend 'Fred'. This way I can set up formulae etc
>>>> which will auto update as and when Sheet names are updated. Is this
>>>> possible?
>>>>
>>>> An earlier reply by Bondi (Thanks Bondi) pointed to
>>>> http://www.ozgrid.com/Excel/variable...heet-names.htm, but either
>>>> I'm not reading this right or it's not quite what I need.
>>>>
>>>> TIA.
>>>>
>>>> Chris.
>>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
Don Guillett
Guest
Posts: n/a
 
      23rd Feb 2007
File returned to Chris with desires

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row < 3 Or Target.Column <> 2 Then Exit Sub
On Error Resume Next
Application.EnableEvents = False
Sheets(Target.Row).Name = Target
Application.EnableEvents = True
End Sub

--
Don Guillett
SalesAid Software
(E-Mail Removed)
"Chris Mitchell" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Thanks for the offer Don, I've sent the file to you.
>
> "Don Guillett" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> You really should stay in the ORIGINAL thread. Send me (address below)
>> your workbook if you like.
>>
>> --
>> Don Guillett
>> SalesAid Software
>> (E-Mail Removed)
>> "Chris Mitchell" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> Thanks Don.
>>>
>>> Our most recent posting must have passed each other in the ether.
>>>
>>> "Don Guillett" <(E-Mail Removed)> wrote in message
>>> news:%(E-Mail Removed)...
>>>> If you used the macro I provided to get an index and you had a title in
>>>> row 1 then
>>>>
>>>> Sub listsheets()
>>>> For i = 1 To Worksheets.Count
>>>> Cells(i + 1, "a") = Sheets(i).Name
>>>> Next i
>>>> End Sub
>>>>
>>>> right click sheet tab>view code>insert this. A change to the listed
>>>> name will now chg the sheet name.
>>>> I would run my original macro before in case you have moved sheets.
>>>>
>>>> Private Sub Worksheet_Change(ByVal Target As Range)
>>>> If Target.Column <> 1 Then Exit Sub
>>>> Sheets(Target.Row - 1).Name = Target
>>>> End Sub
>>>>
>>>> --
>>>> Don Guillett
>>>> SalesAid Software
>>>> (E-Mail Removed)
>>>> "Chris Mitchell" <(E-Mail Removed)> wrote in
>>>> message news:(E-Mail Removed)...
>>>>> What I want to do is set up a Workbook with Sheets N01 - N30, and have
>>>>> an index Sheet such that when N01 in the index is overtyped with
>>>>> 'Fred' Worksheet N01 is renamend 'Fred'. This way I can set up
>>>>> formulae etc which will auto update as and when Sheet names are
>>>>> updated. Is this possible?
>>>>>
>>>>> An earlier reply by Bondi (Thanks Bondi) pointed to
>>>>> http://www.ozgrid.com/Excel/variable...heet-names.htm, but either
>>>>> I'm not reading this right or it's not quite what I need.
>>>>>
>>>>> TIA.
>>>>>
>>>>> Chris.
>>>>>
>>>>
>>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Renaming worksheets James Microsoft Excel Worksheet Functions 0 12th May 2009 11:45 PM
Renaming worksheets =?Utf-8?B?TWlrZSBBbGxlbg==?= Microsoft Excel Misc 8 21st Jan 2007 02:15 AM
Renaming worksheets Patrick Simonds Microsoft Excel Programming 5 30th Mar 2006 03:23 PM
Renaming Worksheets Ron de Bruin Microsoft Excel Programming 5 15th Dec 2005 08:21 PM
Renaming Worksheets rbanks Microsoft Excel Programming 2 16th Jun 2004 11:51 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:06 AM.