
WshSource.Rows(lngRow).Copy Destination:=wshTarget.Cells(lngTargetRow, 1) WshSource.Rows(lngFirstRow - 1).Copy Destination:=wshTarget.Cells(1, 1)

WshTarget.Name = wshSource.Cells(lngRow, lngNameCol).Value Set wshTarget = Worksheets.Add(After:=Worksheets(Worksheets.Count))

If wshSource.Cells(lngRow, lngNameCol).Value wshSource.Cells(lngRow - 1, lngNameCol).Value Then LngLastRow = wshSource.Cells(, lngNameCol).End(xlUp).Row Copy the following code into the code module that appears:Ĭonst lngNameCol = 2 ' names in second column (B)Ĭonst lngFirstRow = 2 ' data start in row 2.

