Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I saw some other post about kind of the same problem but not this way.
I have a risk evaluation formula in a cell. Output range is between 1 and 9 If between 1 and 3, I want to assign the color lightgreen to it If between 4 and 6 I want to assign the color yellow to it and red if 7 to 9. Is this possible within the Function use ? If not, How can I apply that automatically ? a macro ? How ? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Use the Conditional Formatting tool from the Format menu.
-- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Junkyard Engineer" wrote in message ... I saw some other post about kind of the same problem but not this way. I have a risk evaluation formula in a cell. Output range is between 1 and 9 If between 1 and 3, I want to assign the color lightgreen to it If between 4 and 6 I want to assign the color yellow to it and red if 7 to 9. Is this possible within the Function use ? If not, How can I apply that automatically ? a macro ? How ? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
you could define
Private Sub Worksheet_Change(ByVal Target As Range) If Range("j48").Value 0 And Range("j48").Value < 4 Then Range("j48").Interior.ColorIndex = 35 ElseIf Range("j48").Value 3 And Range("j48").Value < 7 Then Range("j48").Interior.ColorIndex = 36 Else Range("j48").Interior.ColorIndex = 3 End If end sub on the code of the worksheet and change the argument of Range to the value of the cell you want there's probably a much better way to do this, and i'm sure someone will point it out "Junkyard Engineer" wrote: I saw some other post about kind of the same problem but not this way. I have a risk evaluation formula in a cell. Output range is between 1 and 9 If between 1 and 3, I want to assign the color lightgreen to it If between 4 and 6 I want to assign the color yellow to it and red if 7 to 9. Is this possible within the Function use ? If not, How can I apply that automatically ? a macro ? How ? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ok, that one is interesting because conditional formatting only allows 3
arguments.. thanks "Gixxer_J_97" a écrit dans le message de ... you could define Private Sub Worksheet_Change(ByVal Target As Range) If Range("j48").Value 0 And Range("j48").Value < 4 Then Range("j48").Interior.ColorIndex = 35 ElseIf Range("j48").Value 3 And Range("j48").Value < 7 Then Range("j48").Interior.ColorIndex = 36 Else Range("j48").Interior.ColorIndex = 3 End If end sub on the code of the worksheet and change the argument of Range to the value of the cell you want there's probably a much better way to do this, and i'm sure someone will point it out "Junkyard Engineer" wrote: I saw some other post about kind of the same problem but not this way. I have a risk evaluation formula in a cell. Output range is between 1 and 9 If between 1 and 3, I want to assign the color lightgreen to it If between 4 and 6 I want to assign the color yellow to it and red if 7 to 9. Is this possible within the Function use ? If not, How can I apply that automatically ? a macro ? How ? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Assigning Color to a number | Excel Discussion (Misc queries) | |||
Assigning Color in If Function | Excel Worksheet Functions | |||
assigning a value to a cell | Excel Worksheet Functions | |||
assigning macro to cell | Excel Programming | |||
Assigning a shape to cell | Excel Programming |