Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Select Case Statement - Help Font Color
Here is my code and when the variable icolor is equal to 53 which does set
the interior color I would like the font to turn white because it is hard to read in black. What is the correct syntax and will the If statement after the case statement do the trick? My code is off because my font will not turn white right now. If Not (Intersect(Target, Me.Range("BESTDel")) Is Nothing) Then Select Case Target.Value Case Is = "": icolor = xlNone Case Is < 0.9: icolor = 3 Case Is < 0.96: icolor = 6 Case Is < 0.98: icolor = 53 Case Is < 1: icolor = 16 Case Is = 1: icolor = 44 Case Else: icolor = xlNone End Select If icolor = 53 Then Target.Cells.Font.Color = 0 End If Target.Interior.ColorIndex = icolor |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Select Case Statement - Help Font Color
Hi,
Try something like this Target.Font.ColorIndex = 2 -- Thanks, Shane Devenshire "Walter" wrote: Here is my code and when the variable icolor is equal to 53 which does set the interior color I would like the font to turn white because it is hard to read in black. What is the correct syntax and will the If statement after the case statement do the trick? My code is off because my font will not turn white right now. If Not (Intersect(Target, Me.Range("BESTDel")) Is Nothing) Then Select Case Target.Value Case Is = "": icolor = xlNone Case Is < 0.9: icolor = 3 Case Is < 0.96: icolor = 6 Case Is < 0.98: icolor = 53 Case Is < 1: icolor = 16 Case Is = 1: icolor = 44 Case Else: icolor = xlNone End Select If icolor = 53 Then Target.Cells.Font.Color = 0 End If Target.Interior.ColorIndex = icolor |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Select Case Statement | Excel Worksheet Functions | |||
Case Statement for Changing Font AND Background Color | Excel Programming | |||
For...Next or Select Case Statement | Excel Programming | |||
Select Case within IF-Else statement | Excel Programming | |||
select case statement | Excel Programming |