I reached out & have gotten assistance.
Here is the working code:
[Option Explicit
Sub FIND_DUPLICATE()
Dim myDataRng As Range
Dim cell As Range
Dim strV As String
' Use column A
Set myDataRng = Range(Range("A1"), Cells(Rows.Count, "A").End(xlUp))
For Each cell In myDataRng
If Application.CountIf(Range(Range("A1"), cell), cell.Value) > 1 Then
strV = cell.Value
If MsgBox("""" & strV & """ has already appeared above. Delete duplicates?", vbYesNo) = vbYes Then
cell.ClearContents
While Application.CountIf(myDataRng, strV) > 1
myDataRng.find(strV, cell, xlValues, xlWhole, , xlNext).ClearContents
Wend
End If
End If
Next cell
End Sub]
|