View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Split or copy records n-times as excel scans the value of a colum

Sub AAA()
Dim i As Long, Num As Long
i = 1
Do While Cells(i, 1) < ""
Num = Cells(i, 1)
Cells(i, 1).Offset(1, 0).Resize(Num).EntireRow.Insert
Set rng = Cells(i, 1).Offset(1, 0).Resize(Num)
Cells(i, 1).EntireRow.Copy Destination:=rng
i = i + Num + 1
Loop
End Sub

--
Regards,
Tom Ogilvy

"Loops" wrote in message
...
I would like to split or copy record n-times based on n-value on of a row.
How do you contruct the loop?