View Single Post
  #2   Report Post  
Dave O
 
Posts: n/a
Default

I did it a slightly different way- see the code that follows. Step 1
is to make a backup copy of your data so nothing important is lost.

In the code that follows, you'll need to replace the word "Main" with
the name of the tab that contains the list of names. Replace the word
"Template" with the name of the tab that contains your template.

This code makes a copy of Template for each person in the list; you
have the option to rename each newly created template with the name of
the person. The code requires that the cell immediately following the
last name in the list is blank.

Sub Hru48()
Dim K As Byte, Inndex As Byte
Dim Nayme As String

Sheets("Main").Select 'This tab contains the list of names
Range("c3").Select 'The first name in the list

Do Until ActiveCell.Value = "" 'Assumes the cell after the last name in
the list is blank

Nayme = ActiveCell.Value
Sheets("Template").Copy After:=Sheets(2) ' "Template" is the name of
your template tab
Inndex = ActiveSheet.Index
Range("C3").Select
ActiveCell.Formula = "=Main!C" & 3 + K ' Creates a formula that
changes with each template copy to pick up the next name on the list
ActiveSheet.Move After:=Sheets(Inndex + K)
Sheets("Main").Select 'Return to pick up another name
ActiveCell.Offset(1, 0).Select 'Get the next name
K = K + 1

Loop

End Sub