"IF,THEN FUNCTION" Question


Posted by Rich wong on December 03, 2001 3:47 PM

To anybody out there....

I have a question concerning the usage of "If,Then" functions in Excel. I understand how to use the basic form of this function. However, if I want two conditions (instead of one), how would I write it?

More specifically, I have two cells, B3 and C3. I want it so the difference of C3-B3 will yield "YES", if the number is greater than 5, and "NO" for all other answers. HOWEVER, I ALSO, want the condition "YES" tied also to the value of B3 ALSO being greater than 50.

Confused? Well, without the second condition (greater than 50), I would simply have:

=If((C3-B3)>5,"YES","NO")

But now, I want to include the second condition of B3 also being greater than 50. THIS IS WHERE I'M STUCK.

Any help would be appreciated.

Thanks.

Posted by IML on December 03, 2001 4:52 PM

How about
=IF(OR(C3-B3>5,B3>50),"yes","no")

good luck

Posted by Tom D. on December 03, 2001 9:19 PM

Not sure if you want to use "OR" or "AND". "OR" will result in a "YES" if either condition is true, "AND" will require both conditions to be true for a "YES" answer.



Posted by RICH on December 04, 2001 6:36 AM

IML AND TOM D... : THANKS A BUNCH. IT WORKED!