color of cell fill

G

Guest

I want to set up a mathmatical formula that will fill a cell with a specific
color that corresponds to the value the formula returns. For instance, if
the formula returns 99 - the cell would be green, if 70 it would be yellow
and if < 60 it would be red. Anyone know how to accomplish this?
 
P

Pete_UK

You can do this with Format | Conditional Format while the cell is
selected (assume it is A1). Then in the panel that pops up you can
choose Formula Is rather than Cell Value Is and enter the formula:

=A1>=99

(I'm assuming you want 99 or above), then click the Format button on
the panel, select the Patterms tab and choose Green, then OK. Then
click Add and set up a similar condition for:

=A1>=70

and choose a yellow background, then OK and Add, and then finally your
third condition:

=A1<60

and select a Red background. Click OK twice to come out of the CF
panel.

Your normal background colour would be applied if the value in A1 is
=60 and <70.

Hope this helps.

Pete
 
G

Guest

Try using Format -> Conditional Format

This will work for 3 or fewer condions. If you have more than 3 conditions,
you'll need to do it with VBA.
 

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

Top