Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default rename excel tabs months for year without doing it individually

I want to rename the tabs of a new work book with the months of the year jan
09 to dec 09 without having to do it individually.
I'm sure it can be done by select all tabs - but then what??
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 396
Default rename excel tabs months for year without doing it individually

If you don't want to do it manually (what the heck... 12 stupid changes),
then you need VBA code for it.


--
Wigi
http://www.wimgielis.be = Excel/VBA, soccer and music


"Vicky P" wrote:

I want to rename the tabs of a new work book with the months of the year jan
09 to dec 09 without having to do it individually.
I'm sure it can be done by select all tabs - but then what??

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default rename excel tabs months for year without doing it individuall

Wigi - thank you for answering
it is not so much that I can't rename 12 tabs manually - but I am such a
baby at this and I really do want to learn "how to do stuff"
In the future i may need to rename 365 tabs - then it would'nt be so easy -
so start small.
I've learnt such a lot - and its always a joy when you find something out
that makes life easier / quicker
I have opened VBA code - but what do you do when you are there??


"Wigi" wrote:

If you don't want to do it manually (what the heck... 12 stupid changes),
then you need VBA code for it.


--
Wigi
http://www.wimgielis.be = Excel/VBA, soccer and music


"Vicky P" wrote:

I want to rename the tabs of a new work book with the months of the year jan
09 to dec 09 without having to do it individually.
I'm sure it can be done by select all tabs - but then what??

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 364
Default rename excel tabs months for year without doing it individuall

To learn use
Sub RenameTabs()
' Renames all worksheet tabs with each worksheet's cell A1 contents.
'If cell A1 has no content, then that tab is not renamed.

For i = 1 To Sheets.Count
If Worksheets(i).Range("A1").Value < "" Then
Sheets(i).Name = Worksheets(i).Range("A1").Value
End If
Next

End Sub

Source:
http://it.toolbox.com/wiki/index.php...Worksheet_Tabs

"Vicky P" wrote:

Wigi - thank you for answering
it is not so much that I can't rename 12 tabs manually - but I am such a
baby at this and I really do want to learn "how to do stuff"
In the future i may need to rename 365 tabs - then it would'nt be so easy -
so start small.
I've learnt such a lot - and its always a joy when you find something out
that makes life easier / quicker
I have opened VBA code - but what do you do when you are there??


"Wigi" wrote:

If you don't want to do it manually (what the heck... 12 stupid changes),
then you need VBA code for it.


--
Wigi
http://www.wimgielis.be = Excel/VBA, soccer and music


"Vicky P" wrote:

I want to rename the tabs of a new work book with the months of the year jan
09 to dec 09 without having to do it individually.
I'm sure it can be done by select all tabs - but then what??

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default rename excel tabs months for year without doing it individuall

Couple more.

Type January-2009 in A1 of sheet1

Copy down to A12 then run macro.

Sub NameWS()
'name sheets with list in A1:A12 on first sheet
On Error Resume Next
For i = 1 To Worksheets.Count
Sheets(i).Name = Sheets(1).Cells(i, 1).Value
Next i
End Sub

The next macro will rename existing sheets to month and day

Sub NameSheets()
'Chip Pearson Feb 14th, 2007
Dim Ndx As Long
Dim StartMonth As Variant
StartMonth = Application.InputBox(prompt:="Enter the month number.",
Type:=1)
If StartMonth = False Then
Exit Sub
End If
For Ndx = 1 To ActiveWorkbook.Worksheets.Count
ActiveWorkbook.Worksheets(Ndx).Name = Format(DateSerial( _
IIf(StartMonth = 1, Year(Now) + 1, Year(Now)), StartMonth, Ndx), _
"dd mmm yyyy")
Next Ndx
End Sub

Maybe you want to add new sheets for a month

Sub Add_Sheets()
For i = 31 To 1 Step -1
Worksheets.Add.Name = "October " & i
Next
End Sub


Gord Dibben MS Excel MVP

On Tue, 7 Oct 2008 17:05:07 -0700, Sheeloo
wrote:

To learn use
Sub RenameTabs()
' Renames all worksheet tabs with each worksheet's cell A1 contents.
'If cell A1 has no content, then that tab is not renamed.

For i = 1 To Sheets.Count
If Worksheets(i).Range("A1").Value < "" Then
Sheets(i).Name = Worksheets(i).Range("A1").Value
End If
Next

End Sub

Source:
http://it.toolbox.com/wiki/index.php...Worksheet_Tabs

"Vicky P" wrote:

Wigi - thank you for answering
it is not so much that I can't rename 12 tabs manually - but I am such a
baby at this and I really do want to learn "how to do stuff"
In the future i may need to rename 365 tabs - then it would'nt be so easy -
so start small.
I've learnt such a lot - and its always a joy when you find something out
that makes life easier / quicker
I have opened VBA code - but what do you do when you are there??


"Wigi" wrote:

If you don't want to do it manually (what the heck... 12 stupid changes),
then you need VBA code for it.


--
Wigi
http://www.wimgielis.be = Excel/VBA, soccer and music


"Vicky P" wrote:

I want to rename the tabs of a new work book with the months of the year jan
09 to dec 09 without having to do it individually.
I'm sure it can be done by select all tabs - but then what??


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
rename sheet tabs in excel blantyreson Excel Discussion (Misc queries) 2 August 22nd 07 06:31 PM
rename tabs May Excel Discussion (Misc queries) 5 February 14th 07 11:45 PM
Rename all existing worksheet tabs MikeM Excel Discussion (Misc queries) 14 October 20th 06 03:29 AM
how do I set up an entry so that 3 months or one year later Excel. jhg1226 Excel Worksheet Functions 0 March 11th 05 07:49 PM
How do i change 15 months to read 1 year and 3 months? Marty Excel Discussion (Misc queries) 1 February 17th 05 11:21 PM


All times are GMT +1. The time now is 10:31 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"