IF statement and colors

  • Thread starter Thread starter Dan
  • Start date Start date
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".
 
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
 
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
 
Back
Top