Using IF with AND

  • Thread starter Thread starter Steve
  • Start date Start date
S

Steve

New to excel. Want to use IF with AND. I can't seem to get my formula
to work. Can anyone halp with thi simple one?

a b
1 1
2 1
3 1


All I want it to do is: If A1 is over 1 AND A2 is over 1 OR A3 is over
1 then say YES.

Please help - I have spemt hours over this - getting there slowly!

I wrote this, but it don't work!
=IF(OR(A3>1,AND(A1>1,A2>1)),"YES","No")

Cheers

Steve
 
Your formula seems to work ok for me in XL97. Maybe it's in the
interpretation. This formula says that if A3 is greater than 1 it will
return a Yes, regardless of what A1 and A2 are........ and also, it will
return a Yes if both A1 and A2 are greater than 1, regardless of what A3
is......in all other cases, it will return a No.......

Post what problem you are experiencing with it and someone will help.

Vaya con Dios,
Chuck, CABGx3
 
Hello:

I think everything is working correctly. (I assume you are getting "No."
You are testing all values for greater than one. None are therefore
the expression evaluates to no. If you meant greater than or equal you
need to change your test to

=IF(OR(A3>=1,AND(A1>1,A2>1)),"YES","No")

This will return Yes in this situation because the first condition is true.
If you wish to do the same with the "And" then:

=IF(OR(A3>=1,AND(A1>=1,A2>=1)),"YES","No")

Then it returns Yes because both conditions are true.

Pieter Vandenberg

: New to excel. Want to use IF with AND. I can't seem to get my formula
: to work. Can anyone halp with thi simple one?

: a b
: 1 1
: 2 1
: 3 1


: All I want it to do is: If A1 is over 1 AND A2 is over 1 OR A3 is over
: 1 then say YES.

: Please help - I have spemt hours over this - getting there slowly!

: I wrote this, but it don't work!
: =IF(OR(A3>1,AND(A1>1,A2>1)),"YES","No")

: Cheers

: Steve
 
Ahhhhh I knew I was being stupid!!!! I Meant more than or equal to!!!!

Many many thanks.

I Love you all. If I could kiss you i would!!!!


Steve
 

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

Back
Top