Function GetColorIndex(Cell_Font As Range) As Double GetColorIndex = Cell_Font.Interior.ColorIndex End Function Sub DD() For i = 1 To 200 For j = 1 To 8 If GetColorIndex(Cells(i, j)) = 4 Or GetColorIndex(Cells(i, j)) = 15 Or GetColorIndex(Cells(i, j)) = 19 Then GoTo NEXT_ Else: Cells(i, j).Interior.ColorIndex = -4142 End If NEXT_: Next j Next i End Sub