Boolean 0/1 instead of True/False
You have a column of TRUE or FALSE , say in B1:B1000 . TRUE is 1 and FALSE
is 0, so
=SUM(B1:B1000)
will sum all the TRUEs. Or did I misunderstand something ?
HTH. Best wiushes Harald
"Tony" skrev i melding
...
Thanks Harald,
Your formula works, but it doesn't solve my problem (yet). I have a list
of
1000 true or false values in one column and I need to sum all the true
values. And I may not use countif or sumif etc because of linearity
problem.
I may use count and sum though.
I tryed your solution adapting it and using sumproduct() and putting all
1's
in the second array. Alas that didnt work.
Any other ideas most welcome.
Thanks
Tony
"Harald Staff" wrote:
TRUE is 1 and FALSE is 0, try it in any calculation, as in
=4*TRUE-3*FALSE
HTH. Best wishes Harald
"Tony" skrev i melding
...
I am using Solver which requires expresions to be linear. In other
words
Excel Solver does not allow any IF, COUNTIF or other nonlinear
functions.
I
want to build a model which includes logical expresions (True/False)
results,
and be able to sum the true values. So I want (1/0) instead of
(True/False).
So my question is how can I set a cell to be boolean 1/0 ?
Thanks
|