View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
FiluDlidu FiluDlidu is offline
external usenet poster
 
Posts: 66
Default Question relating to the OR function

Yes I agree that 2/0 is meaningless, but I wanted to make it simple... The
zero could have been the value of a cell that happened to be equal to 0, but
not necessarily, or the second argument could have been a lookup function
that would not have worked properly or any type of error.

My problem was a little more complex than that, but I didn't want to be
unclear when all I really wanted to know was if there was an easy way around
it.

I'm still using XL2003 and am therefore limited to only three conditions in
conditional formatting, so I want to cram any possibility in any one of them,
but I keep getting falses where it should really be true for at least one of
the argument was true... Oh well! Let's get to work.

Thanks for taking the time to give your thoughts on that.

"Tyro" wrote:

Nope. Excel is not a sophisticated programming language. It evaluates all
parts of the OR even if one is true. My question to you is what is the value
of 2/0? Mathematically, it's meaningless because as the divisor approaches
0, the quotient approaches infinity. So does 2/0 = 3/0 (infinity = infinity)
and thus 2 = 3?

Tyro

"FiluDlidu" wrote in message
...
Hi all,

I half-noticed a long while ago that whenever there is an error within the
arguments to test in a logical function, the final result will also be an
error.

But it just stroke me today that if I have something like...
A1: 1
A2: =OR(A1=1,A1=2/0)
...A2 will return an error despite the fact the first argument returned
TRUE, which in any case should validate the OR... shouldn't it?

Is there a trick to go around this problem without stacking functions?

Thanks for any input,

Feelu