This block of code inserts a blank row at every change in column A. The loop begins at the bottom. This used to run extremely fast. Now it's slow. Any ideas why?
Dim firstRow As Integer
Dim currentRow As Integer
firstRow = 2
For currentRow = Range("A1048576").End(xlUp).Row To firstRow Step -1
If Range("A" & currentRow) <> Range("A" & currentRow).Offset(-1, 0) Then
Range("A" & currentRow).EntireRow.Insert
End If
Next
There is other code in this procedure. For some reason it takes a long time. When I run this code in its own procedure it zips right thru.
Bookmarks