IF statement and colors

D

Dan

Does anyone know a way w/in an IF statement to make the
format of the cell itself change color?

i.e. If a value in column A is above 100 you want the cell
next to it in column B to turn green and say "GO" but if
it is below you want it to turn red and say "STOP".
 
D

Don Guillett

in b1
=if(a1>=100,"Go","Stop")
and format>conditional formula
formula is =a1>=100 and format to green
ADD
formula is =a1<100 and format ret
 
G

Gord Dibben

Dan

If you want the colour and the text you will have to do it in several steps.

1. In B1 enter =IF(A1>100,"GO","STOP")

2. Drag/Copy down column B as far as you wish.

3. Select B1 and Format>Conditional Formatting>Formula is: =A1>100

4. Format>Pattern>Green>OK>OK

5. Select B1 and the Paintbrush Icon from Formatting Toolbar. Drag the
Paintbrush down column B.

If just want the colour, eliminate steps 1 and 2.

Gord Dibben Excel MVP - XL97 SR2 & XL2002
 

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