Programatically making worksheets

D

dorre

Hello

Consider a worksheet called MasterList and a second worksheet called
Level_TEMPLATE (the name on the tab).

MasterList has a range from B10 to B20 listing TAB names (Level_6a,
Level_8d, Level_4d, ...This list may also contain blanks.)

Now I want to generate a new worksheet identical to the Level_TEMPLATE for
each TAB name listed in Worksheets("MasterList").Range("B10:B20"). I would
end up with new worksheets called Level_6a, Level_8d, etc. Of course I
could do this manually, but I'm trying to automate the process.

I would really appreciate assistance with this. I've never tried this
before.

TQ
dorre
 
G

Guest

Try this:


Sub MKSheet()
Dim s(20) As String
Sheets("MasterList").Select
For i = 1 To 20
s(i) = Cells(i, 1).Value
Next
For i = 1 To 20
Sheets("Level_TEMPLATE").Copy Before:=Sheets(1)
Sheets("Level_TEMPLATE (2)").Select
Sheets("Level_TEMPLATE (2)").Name = s(i)
Next
End Sub


After removing blanks and duplicates from the list in MasterList.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top