Sub SheetMaker()
Dim ShtName As String 'Sheet Name
Dim MySht As String 'True/False
Dim ws As Worksheet
Dim MyNum As String 'Number
Dim MyCust As String 'Customer
Dim MyAddr As String 'Address
Dim MyCity As String 'City
Dim MyMod As String 'Model No.
Dim MyAmt As String 'Amt
Dim MyDT As String 'Date
Dim MyPN As String 'Partner Name
Dim MyPA As String 'Partner Address
Dim MyPC As String 'Partner City
Worksheets("main sheet").Select
Range("A2").Select
Do Until IsEmpty(ActiveCell)
ShtName = ActiveCell.Value
For Each ws In ActiveWorkbook.Worksheets
If ws.Name = ShtName Then
MySht = True
Exit For
Else
MySht = False
End If
Next
If MySht = False Then
MyNum = ActiveCell.Value
MyCust = ActiveCell.Offset(0, 1).Value
MyAddr = ActiveCell.Offset(0, 2).Value
MyCity = ActiveCell.Offset(0, 3).Value
MyMod = ActiveCell.Offset(0, 4).Value
MyAmt = ActiveCell.Offset(0, 5).Value
MyDT = ActiveCell.Offset(0, 6).Value
MyPN = ActiveCell.Offset(0, 7).Value
MyPA = ActiveCell.Offset(0, 8).Value
MyPC = ActiveCell.Offset(0, 9).Value
Worksheets("Template").Copy Before:=Worksheets("Template")
ActiveSheet.Name = MyNum
Range("C3").Value = MyCust
Range("C4").Value = MyAddr
Range("C6").Value = MyCity
Range("C8").Value = MyMod
Range("F8").Value = MyNum
Range("H3").Value = MyPN
Range("H4").Value = MyPA
Range("H6").Value = MyPC
Range("D11").Value = MyAmt
Range("F11").Value = MyDT
Range("A1").Select
Worksheets("main sheet").Select
ActiveCell.Offset(1, 0).Select
Else
ActiveCell.Offset(1, 0).Select
End If
Loop
End Sub