Making 'True' =1 "false" =0
Try it like this:
=SUMPRODUCT(--($C$4:$I$4=C4),--($C$5:$I$50))
--
Biff
Microsoft Excel MVP
"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.
|