I have been using the following code to insert a blank row after a change of data in a column.
Sub InsertRowAtChangeInValueCSR()
Dim lRow As Long
For lRow = Cells(Cells.Rows.Count, "F").End(xlUp).Row To 2 Step -1
If Cells(lRow, "F") <> Cells(lRow - 1, "F") Then Rows(lRow).EntireRow.Insert
Next lRow
End Sub
What would I change in order to insert two blank rows? If I simply run it twice it will insert three blank rows, but I would like just two.
Thanks.
Bookmarks