Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,344
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Select Case Statement Katie Excel Worksheet Functions 13 December 1st 08 07:32 PM
Case Statement for Changing Font AND Background Color jjones Excel Programming 11 December 19th 07 07:11 PM
For...Next or Select Case Statement VBA_Newbie79[_2_] Excel Programming 3 July 2nd 07 08:44 PM
Select Case within IF-Else statement rwnelson Excel Programming 8 April 6th 06 06:47 PM
select case statement jrd269[_4_] Excel Programming 4 June 3rd 05 04:22 PM


All times are GMT +1. The time now is 07:00 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"