Sunday, 7 October 2012

Remove duplicates in Excel

Remove duplicates in Excel

Sub DeleteDups()
    do while ActiveCell <> ""
    if activeCell.Value = activecell.Offset(1,0).Value then
        ActiveCell.Offset(1,0).EntireRow.Delete
    else
        ActiveCell.Offset(1,0).Select
    end if
    Loop
End Sub

No comments:

Post a Comment