See if this works for you, it should be a tad faster than looping
Sub ClearDupOnD()
Dim StartRow As Long, LastRow As Long, LastCol As Long
LastRow = Cells(Rows.Count, "B").End(xlUp).Row
LastCol = Cells(1, Columns.Count).End(xlToLeft).Column
Cells(2, LastCol + 1).Resize(LastRow - 1, 1).Formula = "=IF(COUNTIF($D$2:$D2,$D2)=1,D2,"""")"
Range(Cells(2, LastCol + 1), Cells(LastRow, LastCol + 1)).Copy
Range("D2").PasteSpecial xlPasteValues
Range(Cells(2, LastCol + 1), Cells(LastRow, LastCol + 1)).ClearContents
End Sub
Bookmarks