Conditional If Statements

J

jesoldano

Hello--I am a novice with respect to conditional if statements. I
would like to express the following in a formula:

If cell A >=5 AND cell B>2, return Red
If cell A<=5 AND cell B=0, return Green
If cell A>=5 AND cell B=0 OR Cell A<=5 AND cell B=2-5, Return Yellow.

I know this is a lot. What I would like to know is whether it is even
possible to include this many conditions.

Thanks!
 
B

Bob Phillips

=IF(AND(A2>=5,B2>2),"Red",IF(AND(A2<=5,B2=0)<"Green",IF(OR(AND(A2>=5,B2=0),AND(A2<=5,B2=2)),"Yellow","")))

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
J

jesoldano

=IF(AND(A2>=5,B2>2),"Red",IF(AND(A2<=5,B2=0)<"Green",IF(OR(AND(A2>=5,B2=0),­AND(A2<=5,B2=2)),"Yellow","")))

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)









- Show quoted text -

Hi Bob--thanks so much for the quick response. I think this is on the
verge of working, but everything returns as "FALSE." The values in
column A are all percentages. I did not think this would matter, but
could that be what is throwing me off?
 

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