View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Frank Kabel Frank Kabel is offline
external usenet poster
 
Posts: 3,885
Default Excel - Double Negatives (Past, Present and Future)

Bernie Deitrick wrote:
TKT,

Note that

=SUMPRODUCT(--(A1:A100="A"),--(B1:B100="B"))

can also be written

=SUMPRODUCT((A1:A100="A")*(B1:B100="B"))

The multiplication of the two Booleans results in numeric values that
can be summed.

Not sure about the speed differences, and usually, don't care, since
this isn't the sort of formula that I would use many at a time.
Pivot tables would then be the preferred method.


Hi Bernie
according to some discussion the first one should be a little bit
faster. Though to be honest never noticed a difference on my worksheets
:-)

Frank