Mark Duplicates
This one makes distinction between smith and Smith
Sub MarkDups()
Dim SRange As Range
Set SRange = Range("A1", Range("A1").End(xlToRight))
Dim c As Range
For Each c In SRange
Set c = SRange.Find(c, , , xlWhole, , , True)
If Not c Is Nothing Then
Dim firstAddress As String
firstAddress = c.Address
Do
Set c = SRange.FindNext(c)
If c.Address <> firstAddress Then
c.Font.Color = vbRed
End If
Loop While Not c Is Nothing And c.Address <> firstAddress
End If
Next c
End Sub
|