I tried to use a code from one of my previous projects which I think someone in here helped me with. I changed the code a bit and it looks like its working as intented but then I found out that it apparently still is a couple duplicates in column 5, did I miss something when I changed my code?
Dim Rng As Range, Dn As Range, n As Long, Ray As Variant, Ac As Long, c As Long, cell As Range
Ray = ActiveSheet.UsedRange
ReDim nRay(1 To UBound(Ray, 1), 1 To UBound(Ray, 2))
With CreateObject("scripting.dictionary")
.CompareMode = vbTextCompare
For n = 1 To UBound(Ray, 1)
If Not .Exists(Ray(n, 5)) Then
c = c + 1
For Ac = 1 To UBound(Ray, 2)
nRay(c, Ac) = Ray(n, Ac)
Next Ac
.Add Ray(n, 5), c
End If
Next n
Range("A:A").Resize(, UBound(Ray, 2)).ClearContents
Range("A1").Resize(.Count, UBound(Ray, 2)).Value = nRay
End With
Bookmarks