View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default More than 3 cell highlite colors ?

Forgot to remove the color if the condition is not met.

Private Sub Worksheet_Change(ByVal Target As Range)
With Range("G29")
If .Value = 0.95 Then
.Interior.ColorIndex = 10
Else: .Interior.ColorIndex = xlNone
End If
End With

With Range("I29")
If UCase(.Value) = "A" Then
.Interior.ColorIndex = 10
Else: .Interior.ColorIndex = xlNone
End If
End With

End Sub


"rmayer" wrote:

Thanks, I checked the page you refer to. It deals with changing font
color. I need to change cell color ? Wouldn't that be a different method ?

"JMB" wrote:

Hopefully, this will help:

http://www.mcgimpsey.com/excel/conditional6.html

"rmayer" wrote:

I have values created by a formula from info pasted into other cells
in X17 to X24, Y17 to Y24. Again in AC17 to AC24, AD17 to AD24. These IF
formulas use ="","", to present a blank cell if no data is available.
In G29 to G36 I use =X17 to X24 and I29 is =Y17 etc,to move this result
to a report cover page. I use CF to change the cell background color
in G29 to G36 and I29 to I36 depending on what values appear there, as
G29 = 95%, green I29 = A, green, etc. It works great, but....
Now I need a fourth color. Add in's are forbidden.
I have VB that will change cell color in G29 to G36, etc, but only
when values are typed directly in these cells. It will not update
G29 when the value in X17 changes. Is there a way to modify it
so that it will copy the value in X17 to G29, etc, and highlite the
cell to a specified color per value ?
Using Office 2000.
Thanks