Hello everyone,
I have a bunch of worksheets as from sheet2 to sheet35.
I need to rename them based on a list in sheet1 named "List" starting from cell A2.
I've already found this, but it doens't work:
Any help is appreciated!
Thanks
I have a bunch of worksheets as from sheet2 to sheet35.
I need to rename them based on a list in sheet1 named "List" starting from cell A2.
I've already found this, but it doens't work:
Code:
Sub rename()
Dim lr As Long
lr = Sheets("List").Cells(Rows.Count, 1).End(xlUp).Row
For i = 2 To Worksheets.Count
Worksheets(i).Name = Worksheets("List").Range("A2:A" & lr).Value
Next
End Sub
Any help is appreciated!
Thanks
Last edited: