View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.newusers
Joe User[_2_] Joe User[_2_] is offline
external usenet poster
 
Posts: 905
Default OR function produces incorrect result

"MZ" wrote:
I am testing the "OR" function and it seems to produce a false
result even when only one of two logical arguments is false

[....]
Cell D2 is 50
Cell D3 is 3
=IF(OR(D2=6,D3=3),"OK","No good")


Obviously, you have made a mistake. But what that mistake is is anyone's
guess. My guesses:

1. One or both of the contents of D2 and D3 are text, not numeric. What
does TYPE(D2) and TYPE(D3) return?

or

2. You have not copy-and-pasted the formula verbatim from the Formula Bar
into your message, and you have an error in your formula that is not
apparent in your message because you subconsciously corrected the error when
you retyped the formula.

or

3. You misrepresented the facts: D3 is not 3.


----- original message -----

"MZ" wrote in message
...
I am testing the "OR" function and it seems to produce a false result even
when only one of two logical arguments is false (that is, it is acting
like
the AND function that requires all arguments to be true).

Here is the formula I wrote:

Cell D2 is 50
Cell D3 is 3

=IF(OR(D2=6,D3=3),"OK","No good")

The result is "No good" even though the second argument is true.


--
MZ