How do I put logical operators in an Excel =IF Formula?

Posted by Brian Hooper on Super User See other posts from Super User or by Brian Hooper
Published on 2011-01-07T12:25:58Z Indexed on 2011/01/07 12:56 UTC
Read the original article Hit count: 189

Filed under:
|

I'm trying to enter a formula to display text according to an IF condition. The best I can manage is something like...

=IF(myval>=minval & myval <= maxval, "OK", "Not OK")

But this appears to work exactly wrongly, displaying OK when myval is out of range and Not OK when it is in range. How do I specify the logical AND correctly? I have tried && as I have seen in questions here, and inner brackets, but these result in errors.

© Super User or respective owner

Related posts about excel-2003

Related posts about excel-formula