Prevent Excel from evaluating unneeded expressions in OR()

Posted by Wesley on Stack Overflow See other posts from Stack Overflow or by Wesley
Published on 2010-04-29T17:32:08Z Indexed on 2010/04/29 17:37 UTC
Read the original article Hit count: 158

Filed under:
|
IF(OR(ISNA(MATCH(8,B10:B17,0)),MATCH(8,B10:B17,0)>8),"",...BLAH...)

I understand how to fix this problem by rearranging my formula. I have it the way it is to show this point. You can see the OR() statement checks to see if the first MATCH() returns NA. When it does, OR() should automatically return TRUE and not evaluate the second MATCH() because conditions have been met for the OR() to return true no matter what other arguments there are. You'll notice that the first and second MATCH() functions do the same thing. What's happening is the entire function is returning NA because the second MATCH() is executing even though it doesn't have to, the OR() has been satisfied with one TRUE, therefore the function should return "".

Is this a bug or is this intentional?

© Stack Overflow or respective owner

Related posts about excel

Related posts about formula