For Rw = 2 To LastRw
If dsht.Range("D" & Rw) = "cat" Then
tSht.Copy After:=Worksheets(Worksheets.Count) 'copy the template
With ActiveSheet 'fill out the form
'edit these rows to fill out your form, add more as needed
.Name = dsht.Range("A" & Rw)
.Range("C2") = dsht.Range("A" & Rw)
.Range("F2") = dsht.Range("B" & Rw)
.Range("C6") = dsht.Range("C" & Rw)
.Range("C5") = dsht.Range("D" & Rw)
.Range("B12:E12") = dsht.Range("F" & Rw, "I" & Rw)
.Range("F12:I12") = dsht.Range("K" & Rw, "N" & Rw)
.Range("J12:M12") = dsht.Range("P" & Rw, "S" & Rw)
.Range("B16:E16") = dsht.Range("U" & Rw, "X" & Rw)
.Range("F16") = dsht.Range("Z" & Rw)
.Range("G16:I16") = dsht.Range("AA" & Rw, "AC" & Rw)
.Range("J16:M16") = dsht.Range("AE" & Rw, "AH" & Rw)
.Range("B20:E20") = dsht.Range("AJ" & Rw, "AM" & Rw)
.Range("F20:I20") = dsht.Range("AO" & Rw, "AR" & Rw)
.Range("J20:M20") = dsht.Range("AT" & Rw, "AW" & Rw)
End With
If MakeBooks Then 'if making separate workbooks from filled out form
ActiveSheet.Move
ActiveWorkbook.SaveAs SavePath & Range("B3").Value, xlNormal
ActiveWorkbook.Close False
End If
Cnt = Cnt + 1
End If
Next Rw