Hi
I try writing macro to highlight for not duplicates items , but the code doesn't work at all and doesn't show any error .
the code should not highlight item is repeated more than one time, otherwise should highlight it
can anybody tell me what I have to do to work?
Sub Macro2()
Dim lr, fn As Integer
lr = Sheet1.Range("A" & Rows.Count).End(xlUp).Row
For i = 2 To lr
fn = Application.WorksheetFunction.CountIf(Sheet1.Range("A:A"), Sheet1.Range("A" & i).Value)
If fn < 1 Then
Sheet1.Range("A" & i).Interior.ColorIndex = vbRed
End If
Next i
End Sub