View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default Summing a binary truth list

Then I think you really need to explain what you mean by elegant as we are
not mind readers.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Del Cotter" wrote in message
...
On Tue, 2 Oct 2007, in microsoft.public.excel.worksheet.functions,
Bob Phillips said:

B only

=SUMIF(B:B,"B",D:D)

which assumes that B's Ys are in column B, the values in column D

A&B

=SUMPRODUCT(--(B1:B100="Y"),--(C1:C100="Y"),D1:D100)


Yes, I'm quite capable of applying a custom solution by hand for each row,
using my eye and human judgment to decide which function applies to which
row. I think you and Elkar missed the point of "elegant".

SUMPRODUCT or some array function with curly brackets feels like it should
be the way to go, but I was surprised I wasn't able to see my way toward
such a function. The ideal winner would be trivially simple to modify for
a table of four columns of Yes/No, having sixteen rows, and so forth.

--
Del Cotter
NB Personal replies to this post will send email to
,
which goes to a spam folder-- please send your email to del3 instead.