Sub removeDuplicates() theLastRow = lastRow() Columns("A:A").Select Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove Range("A1").Select ActiveCell.FormulaR1C1 = "Time" For i = 2 To theLastRow Cells(i, 1).Value = i - 1 Next i For i = theLastRow To 3 Step -1 If Cells(i, 2).Value = Cells(i - 1, 2).Value Then theRange = i & ":" & i Rows(theRange).Select Selection.Delete Shift:=xlUp End If Next i End Sub Function lastRow() As Integer Range("A1").Select Selection.End(xlDown).Select lastRow = Selection.Row End Function ------------------------------------------------------------------------- First version of the macro ------------------------------------------------------------------------- Sub removeDuplicates() For i = 294 To 3 Step -1 If Cells(i, 2).Value = Cells(i - 1, 2).Value Then theRange = i & ":" & i Rows(theRange).Select Selection.Delete Shift:=xlUp End If Next i End Sub