G
Guest
Below is a macro that I use to insert blank lines after the value in Column A
changes. I need to be able to select which column I want the macro to
evaluate. I am thinking that an input box is the easiest way, but do not know
how to do it. Thanks!
Sub InsertRows()
Dim cRows As Long
Dim i As Integer
For i = Cells(Rows.Count, "A").End(xlUp).Row To 2 Step -1
If Cells(i, "A") <> Cells(i + 1, "A") Then
Cells(i + 1, "A").EntireRow.Insert
End If
Next i
End Sub
changes. I need to be able to select which column I want the macro to
evaluate. I am thinking that an input box is the easiest way, but do not know
how to do it. Thanks!
Sub InsertRows()
Dim cRows As Long
Dim i As Integer
For i = Cells(Rows.Count, "A").End(xlUp).Row To 2 Step -1
If Cells(i, "A") <> Cells(i + 1, "A") Then
Cells(i + 1, "A").EntireRow.Insert
End If
Next i
End Sub