Insert 5 rows between existing values in a single column 1
I'm not sure, but I think this may be more efficient than using code to
insert the rows directly...
Sub Add5RowsBetweenEachExistingRow()
Dim X As Long
Dim LastRow As Long
Const StartRow As Long = 2
Const AddRows As Long = 5
On Error GoTo Whoops
Application.ScreenUpdating = False
With Worksheets("Sheet1")
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
For X = LastRow To StartRow Step -1
.Rows(X).Copy .Cells((AddRows + 2) * (X - StartRow) + StartRow, "A")
If X StartRow Then .Rows(X).Delete
Next
End With
Whoops:
Application.ScreenUpdating = True
End Sub
--
Rick (MVP - Excel)
"camsd" wrote in message
...
I have a sheet with over 10,000 rows of existing data, all in a single
column.
I need to insert 5 rows in between each existing row quickly and easily.
Doing it manually is not so efficient!
For example:
F14745
F14746
F14747
needs to become:
F14745
F14746
F14747
etc.,
Likey a way to do this with a Macro, but I don't have a clue on how to do
it.
Easy way seems to elude me.
Thanks.
|