Forum Discussion
Shanmukhvarun
Nov 12, 2021Copper Contributor
Rename Sheet
Hello
Can we rename multiple sheets in the single click? If Supose I have list in A1 in Sheet 1 and the list each name should be named as the each sheet. Is that possible? Please advise.
4 Replies
What exactly do you mean by "I have list in A1 in Sheet 1"?
Do you have multiple names in cell A1? Or did you mean a list in A1, A2, A3 etc.?
- ShanmukhvarunCopper Contributor
HansVogelaar I have Multiple names in like mentioned in the screenshot and the sheets have already data in that so when I use any code the existing sheet names should change to the names that I provided
Your list starts in A2, not in A1...
Here is a macro you can run. Please test on a copy of your workbook.
Sub RenameSheets() Dim i As Long On Error Resume Next i = 2 Do Sheets(i - 1).Name = Sheets(1).Range("A" & i).Value i = i + 1 Loop Until Sheets(1).Range("A" & i).Value = "" End Sub