Naming Sheets using a range in another worksheet

G

gazza

Is there any way I can put names in a range on one sheet and then
automatically rename sheets with the names listed in the range without
manually renaming each sheet
 
M

Muhammed Rafeek M

use macro

eg:
u have 5 sheets in a workbook
sheet1 A1 to A5 values are
New Name1
New Name2
New Name3
New Name4
New Name5

according to that if you want change sheet name, use below mentioned code:

Sub change_sheet_Name()
Dim i As Integer
For i = 1 To 5 ' or you can use thisworkbook.sheets.count

ThisWorkbook.Sheets(i).Name = ThisWorkbook.Sheets(1).Range("A" & i).Value

Next i
End Sub


Note: cell values should be unique

PLS DO RATE
 
B

Bob Phillips

For Each sh in Activeworkbook.Worksheets
i = i + 1
sh.Name = Cells(i,"A").Value
Next sh

assumes the names are in A1:An on the active worksheet

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
D

Don Guillett

'assumes sheet number and list are the same number. 5 sheets & 5 names
Sub nametabs()
For i = 2 To Cells(Rows.Count, "a").End(xlUp).Row
Sheets(i).Name = Cells(i, "a")
Next
End Sub
 
Top