Try:
Sub Color()
' Changes the cell color to correspond to the letter grade
Dim Grade As Range, Cell as range
Set Grade = Range("L16:L33")
For Each Cell In Grade
If Cell.Value = "A" Then
With Cell.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 5287936
.TintAndShade = 0
.PatternTintAndShade = 0
end With
End If
If Cell = "C" Then
With Cell.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 65535
.TintAndShade = 0
.PatternTintAndShade = 0
End With
End If
Next Cell
End Sub
Bookmarks