I have code that will insert a blank row when a cell value changes.
How can I modify this to instead add a thick bottom border? The border would go from column A
to column AB
every time the value in column B
changes
Sub InsertRows()
Dim lastRow As Long
Dim rowPtr As Long
lastRow = Range("B"& Rows.Count).End(xlUp).Row
For rowPtr = lastRow To 2 Step -1
If Not IsEmpty(Range("B"& rowPtr)) Then
If Range("B"& rowPtr) <> Range("B"& rowPtr - 1) Then
Range("B"& rowPtr).EntireRow.Insert
End If
End If
Next
End Sub