Hello All,
As Title said I'm looking for the code to insert "n" rows base on cell value at column A:A then copy down the data. I found code that can insert "n" rows but still need how to copy data down to the emty rows:
Dim r, n, count As Range
Dim LastRow As Long
Dim temp As Integer
Set r = Range("A:K")
Set count = Range("A3:A" & Range("A" & Rows.count).End(xlUp).Row)
LastRow = Range("A" & Rows.count).End(xlUp).Row
For n = LastRow To 1 Step -1
temp = Range("A" & n)
If (temp > 0.9) Then
Rows(n + 1 & ":" & n + temp).Insert Shift:=xlDown
End If
Next n
Please see sample in attached.
Regards,
tt3
Bookmarks