View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
joeu2004 joeu2004 is offline
external usenet poster
 
Posts: 2,059
Default OR in SUMPRODUCT formula

On Jun 13, 8:22*am, joeu2004 wrote:
On Jun 13, 7:06*am, Walter Briscoe
I want to OR rows 34 and 35 and AND the result with row 19.
Rows 34 and 35 are fixed. 19 is copied through.
I currently have
=SUMPRODUCT(--(($R19:$AC19<0)*(($R$34:$AC$34+($R$35:$AC$35))<0 ))


I think you want:
=SUMPRODUCT(($R19:$AC19<0)*(($R$34:$AC$34<0)+($R $35:$AC$35<0)0))


I got lost in your use of parentheses and the fact that a right
parenthesis is missing.

Rereading, I think your SUMPRODUCT is equivalent to mine as long as $R
$34:$AC$34 and $R$35:$AC$35 are all non-negative. In that case, you
could write:

=SUMPRODUCT(($R19:$AC19<0)*($R$34:$AC$34 + $R$35:$AC$35 < 0))