ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Naming sheets by cell content (https://www.excelbanter.com/excel-discussion-misc-queries/223261-naming-sheets-cell-content.html)

kefee85

Naming sheets by cell content
 
I have 30 sheets in a workbook and would like to use a5:a34 as the sheet
names. Can this be done easily?

Bob Umlas[_3_]

Naming sheets by cell content
 
This macro (untested) should do it - assumes you're on the sheet with the
names in A5:A34
Sub Renamer()
dim i as integer
On Error Resume Next
i=1
For each x in Activesheet.range("A5:34")
sheets(i).name=x.value
i=i+1
Next
End Sub

HTH
Bob Umlas
Excel MVP

"kefee85" wrote in message
...
I have 30 sheets in a workbook and would like to use a5:a34 as the sheet
names. Can this be done easily?





All times are GMT +1. The time now is 07:20 AM.

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