To use this code, right click the sheet name tab for the sheet you want the
cells to change color in. Copy the code from the news reader into the sheet
code module. This code is written to change the color to red if a y is put
into any cell in Column B.
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("B:B")) Is Nothing Then
If LCase(Range("B" & Target.Row).Value) = "y" Then
Rows(Target.Row).Interior.ColorIndex = 3
Else
Rows(Target.Row).Interior.ColorIndex = xlNone
End If
End If
End Sub
If column B is not the column that you had in mind, then Change
Range("B:B") and Range("B" & Target.Row) values in quote marks to the column
you want to apply. The LCase function will allow the user to enter either
an upper case Y or lower case y and still activate the color. The Else
statement is in case an accidental entry is made with y and the correct
entry will cause the red color to go away.