help needed

P

Pat Watson

I have a budget calculator to return a value Good Bad or OK dependent on
status based upon
=IF(B109>B108,"GOOD",IF(B109<B108,"BAD",IF(B109=B108,"OK")))

What I am looking to do in addition to this would be set the cell colour to
red green or blue according to the status how could I do this?

Any help appreciated.
 
B

Bob Phillips

First simplify the formula

=IF(B109>B108,"GOOD",IF(B109<B108,"BAD","OK"))

Colour with conditional formatting

Select the cell
Menu Format>Conditional Formatting
Set to equal
Value of BAD
Click the Format button
Select the Pattern Tab
Select red
OK

Second condition

Click Add
Set to equal
Value of GOOD
Click the Format button
Select the Pattern Tab
Select green
OK

Third condition

Click Add
Set to equal
Value of OK
Click the Format button
Select the Pattern Tab
Select blue
OK


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
D

Dave Peterson

Take a look at Format|Conditional formatting.

You get to specify up to 3 conditions--so it sounds perfect for you.
 
D

davesexcel

a simple way is to goto conditional formating
highlight the range you want to format then goto
format
conditional format
you can do a couple of things, , but the easiest would by just to say
is equal to:
Good
then hit the format button and select what you want
press ok,ok
you can format this way,I believe up to three times, If you need more
conditions then things would get more serious and you would have to go
with VBA.

Also, do a search in your forum, this is definitly not a new topic.
 
Top