Why do you need to do this with a formula - sounds like it's
CONDITIONAL FORMATTING - which is available from the format menu