Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Excel Conditional Formating
I have created a spreedsheet with a formula in CELL G133, which enters a text
sring contained in another Cell(s) dependant on the condition (result) of a number in Cell F133. This works fine using the IF command. CELL G133 Formula is =IF(F133<=4,T133,T134) I now wish to change the colour of CELL G133 dependant on the Result of the number in CELL F133 using conditional format. I have read most of the Q&A and tried a few of them out. such as using Formula IS =f133<=4 turn cell to Green but this does not appear to work. WHAT I AM DOING WRONG? As a sup question I wish to have 4 different conditions but Excell 2003 only appears to offer 3 options for conditional formating. HELP PLEASE -- Regards Martin D |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Excel Conditional Formating
Martin,
You can use select case. Right click your sheet tab, view code and paste this in. Private Sub Worksheet_Calculate() Select Case Range("G133").Value Case Is = 123 icolor = 3 Case Is = 234 icolor = 4 Case Is = 345 icolor = 7 Case Is = 456 icolor = 9 Case Else icolor = xlNone End Select Range("G133").Interior.ColorIndex = icolor End Sub Mike "Martin D" wrote: I have created a spreedsheet with a formula in CELL G133, which enters a text sring contained in another Cell(s) dependant on the condition (result) of a number in Cell F133. This works fine using the IF command. CELL G133 Formula is =IF(F133<=4,T133,T134) I now wish to change the colour of CELL G133 dependant on the Result of the number in CELL F133 using conditional format. I have read most of the Q&A and tried a few of them out. such as using Formula IS =f133<=4 turn cell to Green but this does not appear to work. WHAT I AM DOING WRONG? As a sup question I wish to have 4 different conditions but Excell 2003 only appears to offer 3 options for conditional formating. HELP PLEASE -- Regards Martin D |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Excel Conditional Formating
Mike,
Still a little confused, if I paste in your VBS (as it stands) what will this achieve. or do I need to change the Case IS = to what I want it to equal ? How will this refer to the value of cell F133 ?. If Cell F133 <=4 I want Cell G133 to be GREEN IF Cell F133 Between 5 and 9 I want Cell F133 and G133 to be YELLOW If Cell F133 between 10 and 16 I want Cell F133 and G133 to be AMBER If Cell F133 16 I want Cell F133 and G133 to be RED. -- Regards Martin D "Mike H" wrote: Martin, You can use select case. Right click your sheet tab, view code and paste this in. Private Sub Worksheet_Calculate() Select Case Range("G133").Value Case Is = 123 icolor = 3 Case Is = 234 icolor = 4 Case Is = 345 icolor = 7 Case Is = 456 icolor = 9 Case Else icolor = xlNone End Select Range("G133").Interior.ColorIndex = icolor End Sub Mike "Martin D" wrote: I have created a spreedsheet with a formula in CELL G133, which enters a text sring contained in another Cell(s) dependant on the condition (result) of a number in Cell F133. This works fine using the IF command. CELL G133 Formula is =IF(F133<=4,T133,T134) I now wish to change the colour of CELL G133 dependant on the Result of the number in CELL F133 using conditional format. I have read most of the Q&A and tried a few of them out. such as using Formula IS =f133<=4 turn cell to Green but this does not appear to work. WHAT I AM DOING WRONG? As a sup question I wish to have 4 different conditions but Excell 2003 only appears to offer 3 options for conditional formating. HELP PLEASE -- Regards Martin D |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Install dates formating using conditional formating? | Excel Discussion (Misc queries) | |||
Conditional Formating in Excel | Excel Discussion (Misc queries) | |||
Conditional Formating Feature in Excel | Excel Worksheet Functions | |||
more than 3 conditional formating in excel | Excel Discussion (Misc queries) | |||
Conditional formating in excel | Excel Worksheet Functions |