Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
cell color macro doesn't work
I have this macro that I have been trying to use to change the cell colors of
the cells when the value inside it changes. Private Sub Worksheet_change(ByVal Target As Range) If Not Application.Intersect(Range("G4:G17"), Target) Is Nothing Then If Target.Value 0 Then Target.Cells.Interior.ColorIndex = 35 ElseIf Target.Value < 0 Then Target.Cells.Interior.ColorIndex = 38 Else Target.Cells.Interior.ColorIndex = xlNone End If End If End Sub I can't understand why it wouldn't work. The only things that I can think might be affecting it is: 1, the cells are linked to other cells in the sheet which are linked to an outside program. 2, I don't know if this code translates to each individual cell color changing as the value changes or if it wants to change the range when a cell changes . . . anyway, thanks for any help you can give me. -DMS |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Make text color match cell color with macro? | Excel Discussion (Misc queries) | |||
I moved a file from work to home and now my color macro does not w | Excel Worksheet Functions | |||
back ground color doesn't work in cell. | Excel Worksheet Functions | |||
My fill color and font color do not work in Excel Std Edition 2003 | Excel Discussion (Misc queries) | |||
color filled cell invisible on work screen | Excel Worksheet Functions |