Share via

How to automatically name 25 tabs with different names.

Anonymous
2023-12-31T17:07:03+00:00

Hi! In an Excel Workbook, I want to create 25 tabs with different names. I have an Excel list with the name that each tab should have. How do I merge the two so that I don't have to manually enter the name of each tab?

Microsoft 365 and Office | Excel | For business | Windows

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

Answer accepted by question author

  1. HansV 462.6K Reputation points MVP Volunteer Moderator
    2023-12-31T17:31:04+00:00

    It's not that hard:

    • Make sure that the sheet containing the list of names is the active sheet.
    • Press Alt+F11 to activate the Visual Basic Editor.
    • Select Insert > Module.
    • Copy/Paste the code from my reply into the module window.
    • Change the range A2:A26 as needed.
    • With the insertion point anywhere in the code, press F5 to run it.
    • Switch back to Excel to inspect the result.

    Otherwise, creating 25 sheets manually should take only a few minutes...

    10+ people found this answer helpful.
    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. HansV 462.6K Reputation points MVP Volunteer Moderator
    2023-12-31T17:19:06+00:00

    In the desktop version of Excel for Windows or Mac, you can run a macro. Change the range A2:A26 as needed.

    Sub CreateSheets()
        Dim w As Worksheet
        Dim c As Range
        Application.ScreenUpdating = False
        Set w = ActiveSheet
        For Each c In w.Range("A2:A26")
            Worksheets.Add(After:=Worksheets(Worksheets.Count)).Name = c.Value
        Next c
        Application.ScreenUpdating = True
    End Sub
    
    4 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2023-12-31T17:27:52+00:00

    Thnak you for your quick reply but this is far too complicated. I don't know how to create this macro. There must be a simpler way...

    1 person found this answer helpful.
    0 comments No comments