Share via

Rename Sheet Code for specific sheets

Anonymous
2024-01-10T17:15:26+00:00

Hi I would like to run the code from this solution https://learn.microsoft.com/en-us/office/troubleshoot/excel/use-macro-rename-sheet on all sheets after sheet 1 (sheet 2 through the end of the workbook). What changes to the code can I make to accomplish this?

Thanks!

Microsoft 365 and Office | Excel | For business | Other

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

3 answers

Sort by: Most helpful
  1. Anonymous
    2024-01-11T03:44:02+00:00

    Sub RenameSheets()

    Dim sh As Worksheet

    For Each sh In ActiveWorkbook.Worksheets

    If sh.Index > 1 Then

    sh.Name = sh.Cells(9, 6)

    End If

    Next sh

    End Sub

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2024-01-10T19:10:28+00:00

    Could you share us where do you put the new name of sheets?

    =================

    Sub RenameSheets()

    Dim sh As Worksheet

    A = 1

    For Each sh In ActiveWorkbook.Worksheets

    If sh.Index > 1 Then

    sh.Name = "New Name" & A

    A = A + 1

    End If

    Next sh

    End Sub

    =================

    cell F9 of each sheet

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2024-01-10T17:24:46+00:00

    Could you share us where do you put the new name of sheets?

    =================

    Sub RenameSheets()

    Dim sh As Worksheet 
    
    A = 1 
    
    For Each sh In ActiveWorkbook.Worksheets 
    
        If sh.Index > 1 Then 
    
            sh.Name = "New Name" & A 
    
            A = A + 1 
    
        End If
    
    Next sh 
    

    End Sub

    =================

    Was this answer helpful?

    0 comments No comments