View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
David Biddulph[_2_] David Biddulph[_2_] is offline
external usenet poster
 
Posts: 8,651
Default Numerical value of logicals

You need to turn the trues & falses to numbers.

One way is a double unary minus:
=SUMPRODUCT(--{FALSE,TRUE,FALSE},--{TRUE,TRUE,FALSE})
http://www.mcgimpsey.com/excel/formulae/doubleneg.html
http://xldynamic.com/source/xld.SUMPRODUCT.html

Another way is multiplication.
=SUMPRODUCT({FALSE,TRUE,FALSE}*{TRUE,TRUE,FALSE})
--
David Biddulph

"hmm" wrote in message
...
As I understand it, when logicals are used in a formula, TRUE=1 and
FALSE=0.
If this is so, then why is Excel evaluating the formula below as 0 instead
of
1?

=SUMPRODUCT({FALSE,TRUE,FALSE},{TRUE,TRUE,FALSE})