Hi
Add a new sheet to your file called duplicates.
Then try
Sub aaa()
Dim OutSH As Worksheet
Set OutSH = Sheets("Duplicates")
OutSH.Cells.ClearContents
OutSH.Range("1:1").Value = Sheets("Master").Range("1:1").Value
With Sheets("Master")
For Each ce In .Range("D2:D" & .Cells(Rows.Count, "D").End(xlUp).Row)
If WorksheetFunction.CountIf(.Range("D:D"), ce.Value) > 1 Then
ce.EntireRow.Copy Destination:=OutSH.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0)
End If
Next ce
End With
End Sub
In the sample sheet there was only 1 duplicated entry.
rylo
Bookmarks