tonyvee1973
IS-IT--Management
Hi All
Having a bit of a nightmare with something really simple.
I have a spreadsheet with 27000 lines of data in.
I simply want to insert 10 black rows after a row if column e in that row contains 39013
I have tried below but it only inserts 1 line.. Help
Sub Macro()
nr = Cells(Rows.Count, 5).End(xlUp).Row
For r = nr To 5 Step -1
If Cells(r, 5).Text = "39013" Then
Rows(r + 1).Insert Shift:=xlDown
End If
Next
End Sub
Having a bit of a nightmare with something really simple.
I have a spreadsheet with 27000 lines of data in.
I simply want to insert 10 black rows after a row if column e in that row contains 39013
I have tried below but it only inserts 1 line.. Help
Sub Macro()
nr = Cells(Rows.Count, 5).End(xlUp).Row
For r = nr To 5 Step -1
If Cells(r, 5).Text = "39013" Then
Rows(r + 1).Insert Shift:=xlDown
End If
Next
End Sub