Hi
I'm working on the principle that the number of extra rows, plus the original will match the number of rows of data to be filled in columns H:J.
Sub CreateSubIds()
Dim ExtraRows As Long, ID As Long
ID = Range("B2").Value
ExtraRows = Range("B3").Value
Set findit = Range("A:A").Find(what:=ID, lookat:=xlWhole)
findit.Offset(1, 0).Resize(ExtraRows, 1).EntireRow.Insert shift:=xlDown
findit.Resize(1, 16).Copy Destination:=findit.Offset(1, 0).Resize(ID, 1)
For i = 1 To ExtraRows
findit.Resize(1, 16).Copy Destination:=findit.Offset(i, 0)
findit.Offset(i, 0).Value = ID & "." & Chr(96 + i)
Next i
Range("H2").Resize(ExtraRows + 1, 3).Copy Destination:=Cells(findit.Row, "H")
End Sub
rylo
Bookmarks