klynshoe
Board Regular
- Joined
- Jun 17, 2010
- Messages
- 176
I was provided a while back with the following macro that inserts a blank row based when the contents in the first Column (A) change. I need to change it to the 3rd Column (Column C). Can anyone help me with this edit?
Sub InsertRows()
Dim lr As Long, i As Long
lr = Cells(Rows.Count, 1).End(xlUp).Row
For i = lr To 2 Step -1
If Cells(i, 1) <> Cells(i - 1, 1) Then
Rows(i).Insert
End If
Next
End Sub
Thanks,
Kelly
USING EXCEL 2010
Sub InsertRows()
Dim lr As Long, i As Long
lr = Cells(Rows.Count, 1).End(xlUp).Row
For i = lr To 2 Step -1
If Cells(i, 1) <> Cells(i - 1, 1) Then
Rows(i).Insert
End If
Next
End Sub
Thanks,
Kelly
USING EXCEL 2010