I have to delete multiple numbers on a daily basis when I have to combine two files with over 30,000 entries in them. I created this sub and placed it in my personal.xls and then assigned a shortcut to it (CTRL+SHIFT+D) so that it was available for use whenever I needed it. I also added a few options that can be used if I don't want to delete the duplicate but still need to know when a duplicate exists.
Sub deleteDuplicate()
'
' deleteDuplicate Macro
' Macro recorded 5/6/2003 by StoryM
'
'
For i = 1 To 65536
firstUPC = ActiveCell.Text
If firstUPC = "" Then Exit Sub
ActiveCell.Offset(1, 0).Select
secondUPC = ActiveCell.Text
If firstUPC = secondUPC Then
' Use this code to stop the macro when a duplicate is found.
' Exit Sub
' Use this code to highlight duplicates.
' With Selection.Interior
' .ColorIndex = 6
' .Pattern = xlSolid
' End With
' Use this code to delete duplicates.
Selection.EntireRow.Delete
ActiveCell.Offset(-1, 0).Select
i = i - 1
End If
Next i
End Sub