Auto Insert Rows
Hi
try the following macro. It tests column A and inserts a blank row if
the values change
Sub insert_rows()
Dim lastrow As Long
Dim row_index As Long
lastrow = ActiveSheet.Cells(Rows.count, "A").End(xlUp).row
For row_index = lastrow - 1 To 1 Step -1
If Cells(row_index, "A").Value < Cells(row_index + 1, "A").Value
Then
Cells(row_index + 1, "A").resize(3,1).EntireRow.Insert
(xlShiftDown)
End If
Next
End Sub
--
Regards
Frank Kabel
Frankfurt, Germany
Dominique Feteau wrote:
I need a macro that will insert 3 blank rows between each row i
already have filled. For example:
From:
Customer1
Customer 2
Customer 3
To:
Customer 1
Customer 2
Customer 3
Any help would be appreciated.
Dominique
|