ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   how do I auto name worksheets in Excel? (https://www.excelbanter.com/excel-worksheet-functions/43608-how-do-i-auto-name-worksheets-excel.html)

Kathryn W

how do I auto name worksheets in Excel?
 
hi there

I want to auto name my worksheets in Excel. Eg: Name the first shet January,
nrext sheet February, then have Excel auto name the remaining ten sheets with
the remaining months of the year.

This is similar to the auto fill function where cells can be filled
automatically, but I cannot work out how to name worksheets this way.

Does anyone know if this can be done, and if so, how?

thanks

Kathryn

Rowan

I don't think there is a way to have Excel do this as part of the standard
functionality. You could do it with a macro though:

Sub nmsht()
Dim i As Integer
On Error Resume Next
For i = 1 To 12
Sheets(i).Name = MonthName(i)
Next i
On Error GoTo 0
End Sub

Regards
Rowan

"Kathryn W" wrote:

hi there

I want to auto name my worksheets in Excel. Eg: Name the first shet January,
nrext sheet February, then have Excel auto name the remaining ten sheets with
the remaining months of the year.

This is similar to the auto fill function where cells can be filled
automatically, but I cannot work out how to name worksheets this way.

Does anyone know if this can be done, and if so, how?

thanks

Kathryn


Kathryn W

thanks very much Rowan

I'll give it a try

cheers

Kathryn


"Rowan" wrote:

I don't think there is a way to have Excel do this as part of the standard
functionality. You could do it with a macro though:

Sub nmsht()
Dim i As Integer
On Error Resume Next
For i = 1 To 12
Sheets(i).Name = MonthName(i)
Next i
On Error GoTo 0
End Sub

Regards
Rowan

"Kathryn W" wrote:

hi there

I want to auto name my worksheets in Excel. Eg: Name the first shet January,
nrext sheet February, then have Excel auto name the remaining ten sheets with
the remaining months of the year.

This is similar to the auto fill function where cells can be filled
automatically, but I cannot work out how to name worksheets this way.

Does anyone know if this can be done, and if so, how?

thanks

Kathryn


Rowan

You're welcome.

"Kathryn W" wrote:

thanks very much Rowan

I'll give it a try

cheers

Kathryn


"Rowan" wrote:

I don't think there is a way to have Excel do this as part of the standard
functionality. You could do it with a macro though:

Sub nmsht()
Dim i As Integer
On Error Resume Next
For i = 1 To 12
Sheets(i).Name = MonthName(i)
Next i
On Error GoTo 0
End Sub

Regards
Rowan

"Kathryn W" wrote:

hi there

I want to auto name my worksheets in Excel. Eg: Name the first shet January,
nrext sheet February, then have Excel auto name the remaining ten sheets with
the remaining months of the year.

This is similar to the auto fill function where cells can be filled
automatically, but I cannot work out how to name worksheets this way.

Does anyone know if this can be done, and if so, how?

thanks

Kathryn


Arvi Laanemets

Hi

You can do it in some procedure, but likely during time you need to write
the one, you can rename sheets in a lot of workbooks manually. When I'm
wrong in this, then my next advice will be to create an empty worksheet with
12 renamed sheets (you also can enter all column headers and formulas,
format cells, etc.), save it with some name like MonthsTemplate.xls, and
whenever you need a new workbook, you open it and then save as with new
name.


--
Arvi Laanemets
( My real mail address: arvil<attarkon.ee )



"Kathryn W" <Kathryn wrote in message
...
hi there

I want to auto name my worksheets in Excel. Eg: Name the first shet
January,
nrext sheet February, then have Excel auto name the remaining ten sheets
with
the remaining months of the year.

This is similar to the auto fill function where cells can be filled
automatically, but I cannot work out how to name worksheets this way.

Does anyone know if this can be done, and if so, how?

thanks

Kathryn





All times are GMT +1. The time now is 10:15 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com