Remove duplicate items

Sub RemoveDuplicates()

‘ Delete duplicates in column A

    Cells.Sort Key1:=Range(“A1”)
    totalrows = ActiveSheet.UsedRange.Rows.Count
    
    For Row = totalrows To 2 Step -1
        If Cells(Row, 1).Value = Cells(Row – 1, 1).Value Then
        Rows(Row).Delete
        End If
    Next Row
End Sub

Leave a Reply