View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
[email protected] joeu2004@hotmail.com is offline
external usenet poster
 
Posts: 418
Default how do I use OR in a way that true return calculation

"NZRM" wrote apparently;
Subject: how do I use OR in a way that true return calculation


In the future, please include your question in the __body__ of your
posting, not just the subject. When I saw this inquiry in MS
Discussion Groups
( http://www.microsoft.com/communities...s/default.aspx ),
I could not even read the complete subject line.

Your question is unclear. A concrete example would be helpful.

If you mean that you would like OR() to evaluate to 0 for false and 1
for true, there are two ways depending on circumstance. As part of
arithmetic expression, nothing special is needed. For example:

=OR(A10,B1<0) * SUM(C1:C10)

If OR() stands alone, you can use one of the following tricks:

=--OR(A10,B1<0)
=1*OR(A10,B1<0)

On the other hand, if you mean that you would like the result of a
calculation returned depending on the OR of two conditions, you could
use the first example above, if applicable. Alternatively, try
something the following:

=IF( OR(A10,B1<0), SUM(C1:C10), SUM(D1:D10) )