change background color of a cell with an "IF" command?

L

Lee

I have a command using the IF function that is as follows:
=IF(M3>=80,"YES","NO")

I would like to be able to add a green background if the YES condition is
met and a RED background if the NO condition is met. is there a line of code
that will do this.
 
S

Sandy Mann

Use Conditional Formatting with the the formulas:

=$M$3>=80

and

=$M$3<80

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

[email protected]
Replace @mailinator.com with @tiscali.co.uk
 
Top