Can I change the default sheet name?

A

Amanda097

I would like to change the default worksheet name of Sheet1 to 0001 to
continue 0002, 0003 and so forth. Is there an option where I can change that
name?
 
A

Amanda097

Thanks - I should've worded my question differently. I can rename one sheet
at a time, but I have 100 sheets that I need to name 0001, 0002, 0003...
0100. I changed the default amount of sheets to 100, but I would like for
the sheets to automatically be named 0001, 0002, etc.

Thanks again,
Amanda
 
J

JE McGimpsey

One way:

Run this macro to change the name of the 100 sheets. Delete the macro if
desired, then save the workbook as a template.


Public Sub RenameWorksheets()
Dim i As Long
For i = 1 to Worksheets.Count
Worksheets(i).Name = Format(i, "0000")
Next i
End Sub

You can make this the default template by saving the template as
"Book.xlt" in your XLStart folder.
 
A

Amanda097

Thank you so much - that worked beautifully!!

JE McGimpsey said:
One way:

Run this macro to change the name of the 100 sheets. Delete the macro if
desired, then save the workbook as a template.


Public Sub RenameWorksheets()
Dim i As Long
For i = 1 to Worksheets.Count
Worksheets(i).Name = Format(i, "0000")
Next i
End Sub

You can make this the default template by saving the template as
"Book.xlt" in your XLStart folder.
 
A

Amanda097

Can I also use this type of Macro to name the sheets January, February,
March, etc? I'm not familiar with macros.
 
J

JE McGimpsey

One way:

Public Sub RenameWorksheets()
Dim i As Long
For i = 1 To Worksheets.Count
Worksheets(i).Name = Format(DateSerial(0, i, 1), "mmmm")
Next i
End Sub

Note that this will only work for 12 sheets or less, since sheets can't
have the same name as another sheet.
 
A

Amanda097

Thanks again for being so helpful!!

JE McGimpsey said:
One way:

Public Sub RenameWorksheets()
Dim i As Long
For i = 1 To Worksheets.Count
Worksheets(i).Name = Format(DateSerial(0, i, 1), "mmmm")
Next i
End Sub

Note that this will only work for 12 sheets or less, since sheets can't
have the same name as another sheet.
 
Top