View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
David Biddulph[_2_] David Biddulph[_2_] is offline
external usenet poster
 
Posts: 8,651
Default Making 'True' =1 "false" =0

Yes.
--
David Biddulph

"ASA" wrote in message
...
Thank you , I assume that the first - somehow multiplies by - 1 and the
second one reverses it to make it positive again.


"T. Valko" wrote:

Try it like this:

=SUMPRODUCT(--($C$4:$I$4=C4),--($C$5:$I$50))


"ASA" wrote in message
...
Is there a setting that will automatically apply these at the moment I
have
to apply an if statement before I can get any calculations done.

=SUMPRODUCT($C$4:$I$4=C4,$C$5:$I$50) gives a result of 0 even though
it
shows
=SUMPRODUCT({TRUE,FALSE,FALSE,FALSE,FALSE,TRUE,FAL SE},{TRUE,TRUE,TRUE,TRUE,TRUE,FALSE,TRUE})

whereas if I do =SUMPRODUCT(IF($C$4:$I$4=C4,1,0),IF($C$5:$I$50,1, 0))
gives
the results of 1 with the array of
=SUMPRODUCT({1,0,0,0,0,1,0},{1,1,1,1,1,0,1})

It seems to treat the trues and falses as text rather than values.

I do not want to have to put the if statement in.