Hello, I'm trying to add a new row when numbers in a sequence change, but I want the code to only apply to changes between cells B10:B150.
I'm using this at the moment (courtesy of JBeaucaire):
Sub InsertBlankRows()
Dim lastrow As Long, i As Long
Application.ScreenUpdating = False
lastrow = Range("B" & Rows.Count).End(xlUp).Row
For i = lastrow To 2 Step -1
If Cells(i, "B") <> Cells(i - 1, "B") Then Rows(i).Insert xlShiftDown
Next i
Application.ScreenUpdating = True
End Sub
How do I make this apply to cells B10:B150 only?
Thanks.
Bookmarks