I have a spreadsheet with 1500 e-mails in a column - what is a quick way I can find duplicate e-mails in my column to delete the duplicate data?
Thanks
I have a spreadsheet with 1500 e-mails in a column - what is a quick way I can find duplicate e-mails in my column to delete the duplicate data?
Thanks
In an adjacent column, =if(countif(A$1:A1, A1)>1 "Dup", "")
Entia non sunt multiplicanda sine necessitate
Or you could use advanced filter and have it either shorten the list to unique values in place or copy the unique values to another range.
darkyam, XL 2000 doesn't do unique filtering. That's new with 2007
I think Advanced Filter always supported unique filtering, T.
HI
Providing the cell contents are identical then the following code should be okay.
Regards![]()
Sub rem_dup() Dim a As Integer Application.ScreenUpdating = False For a = 1500 To 1 Step -1 If Application.CountIf(Range("A1:A1500"), Cells(a, 1).Value) > 1 And Cells(a, 1).Value <> "" Then Cells(a, 1).Delete Shift:=xlUp End If Next a Application.ScreenUpdating = True End Sub
Jeff
time to polish my contacts ... was reading autofilter instead of advanced filter ....
or maybe
![]()
Option Explicit Sub ptest() Dim p!, i!, k(), e With Range("a2", Range("a" & Rows.Count).End(xlUp)).Resize(, 1) e = .Value End With ReDim k(1 To UBound(e, 1), 1) With CreateObject("Scripting.Dictionary") .CompareMode = vbTextCompare For i = 1 To UBound(e, 1) If Not IsEmpty(e(i, 1)) Then If Not .exists(e(i, 1)) Then p = p + 1 k(p, 0) = e(i, 1) .Add e(i, 1), p End If End If Next With Range("a2", Range("a" & Rows.Count).End(xlUp)).Resize(, 1) .ClearContents End With End With Range("a1").Resize(p, 1).Value = k End Sub
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks