Try this:-
NB:- "BackUp" your data this code will delete the duplicates
Sub MG01Oct19
Dim Rng As Range, Dn As Range
Dim Q
Dim t
Dim nRng As Range
t = Timer
Set Rng = Range(Range("A2"), Range("A" & Rows.Count).End(xlUp))
With CreateObject("scripting.dictionary")
.CompareMode = vbTextCompare
For Each Dn In Rng
If Not .Exists(Dn.Value) Then
.Add Dn.Value, Array(Dn, 1)
Else
Q = .Item(Dn.Value)
Q(1) = Q(1) + 1
Q(0).Offset(, Q(1)) = Dn.Offset(, 1).Value
.Item(Dn.Value) = Q
If nRng Is Nothing Then
Set nRng = Dn
Else
Set nRng = Union(nRng, Dn)
End If
End If
Next
If Not nRng Is Nothing Then nRng.EntireRow.Delete
End With
MsgBox Timer - t
End Sub
Regards Mick
Bookmarks