Sub different_colour()
Dim lrow As Integer
lrow = Sheets("colors").Range("B" & Rows.Count).End(xlUp).Row
For N = 3 To lrow
If Application.WorksheetFunction.CountIf(Worksheets("colors").Range("B3:B" & lrow), Worksheets("colors").Range("B" & N)) = 1 Then
GoTo skip
Else
Worksheets("colors").Range("B" & N).Interior.ColorIndex = Application.WorksheetFunction.Match(Worksheets("colors").Range("B" & N), Worksheets("colors").Range("B3:B" & lrow), 0) + 2
End If
skip: Next N
Worksheets("colors").Activate
Range("B3").Select
End Sub