• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 237
  • Last Modified:

Replicate master worksheet with different names

Hi - I would like to replicate worksheet titled "Master" in an Excel workbook to various tabs, each tab should receive a name which will be listed in Column A of worksheet titled "List".  For example, cell A1 = "apples", cell A2 = "oranges", cell A3 = "pears", etc... The code should look at column A and automatically know how many worksheets to create based on the list of names.  There will be no spaces between each cell.  Thansk in advance!
1 Solution
This macro will accomplish the task:
Sub CreateFromMaster()
Dim i As Long
Dim oSheet As Worksheet

    Set oSheet = Sheets("Master")
    For i = 1 To oSheet.Range("A" & oSheet.Rows.Count).End(-4162).Row
        Sheets.Add After:=Sheets(Sheets.Count)
        ActiveSheet.Name = oSheet.Cells(i, 1).Value
    Next i
End Sub

Open in new window


Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now