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

G

Guest

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

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 

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