Originally Posted by
Jacob Hilderbrand
You can do this to get started. First we want to check for a duplicate which we can use a CountIf formula on, second you want to check the RGB color of the cell.
[vba]
With Sheets("New Property")
For i = 100 To 2 Step -1 'Change to correct start and end row variables.
'Test for duplicate
If Application.WorksheetFunction.CountIf(.Range("A2:A" & i),"=" & .Range("A" & i).Text)>1 Then
'Test for color
If .Range("A" & i).Interior.Color = RGB(255,0,255) Then
.Range("A" & i).EntireRow.Delete
End If
End If
next i
End With
[/vba]
If you need the font color instead of the fill color just change Interior to Font.