Hi, aghaffar82
Try this:
Sub b1335364b()
'https://www.excelforum.com/excel-general/1335364-delete-duplicating-entries-across-the-worksheet.html
Dim i As Long, j As Long, ra As Long, rc As Long
Dim va
Dim d As Object
t = Timer
ra = Range("A:A").Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
rc = Cells.Find("*", SearchOrder:=xlByColumns, SearchDirection:=xlPrevious).Column
va = Range(Cells(1, "A"), Cells(ra, rc))
Set d = CreateObject("scripting.dictionary")
d.CompareMode = vbTextCompare 'vbBinaryCompare
For j = 1 To UBound(va, 2)
For i = 1 To UBound(va, 1)
If d.Exists(va(i, j)) Then
va(i, j) = ""
Else
d(va(i, j)) = ""
End If
Next
Next
Range(Cells(1, "A"), Cells(ra, rc)) = va
MsgBox "It's done in: " & Timer - t & " seconds"
End Sub
Bookmarks