Excel Conditional Formating

M

Martin D

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
 
M

Mike H

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
 
M

Martin D

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top