Sub InsertRow_At_Change()
Dim i As Long
With Application
.Calculation = xlManual
.ScreenUpdating = False
End With
For i = Cells(Rows.Count, 1).End(xlUp).Row To 2 Step -1
If Cells(i - 1, 1) <> Cells(i, 1) Then _
Cells(i, 1).Resize(1, 1).EntireRow.Insert
Next i
With Application
.Calculation = xlAutomatic
.ScreenUpdating = True
End With
End Sub
Gord Dibben MS Excel MVP
>Lets say you have a 15,000 line spreadsheet covering about 8,000
>different items. Some items have multiple lines devoted to them. Each
[quoted text clipped - 28 lines]
>Is there any way to do that other than manually inserting rows? An
>automated process would save a LOT of time.
Gord Dibben MS Excel MVP
nebuul@gmail.com - 27 Sep 2006 22:57 GMT
Awesome, thanks!
> Sub InsertRow_At_Change()
> Dim i As Long
[quoted text clipped - 48 lines]
>
> Gord Dibben MS Excel MVP