What am I doing wrong?
Posted by Elizabeth on July 31, 2000 3:51 PM
I'm trying to set up conditional color for specific cells and it's not working, what am I doing wrong? (I do have more than 3 conditions)
Sub colorcells()
Range("A6,A10,A17").Select
For Each Cell In Selection
If Cell.Value = "basescenario" Then
'color for base plan
Cell.Interior.ColorIndex = 3
ElseIf Cell.Value = "scenario1" Then
'color for scenario 1
Cell.Interior.ColorIndex = 6
ElseIf Cell.Value = "scenario2" Then
'color for scenario 2
Cell.Interior.ColorIndex = 39
End If
Next Cell
End Sub