View Single Post
  #4   Report Post  
tjtjjtjt
 
Posts: n/a
Default SUM for logical values

Thanks, to both of you...

I understand the alternatives.I've been using something like this:
=COUNTIF(A1:A3,TRUE)

I guess I was asking if there is a programming rationale as to why Excel is
treating literal logical values differently than cell references when the
cells contain logical values.

--
tj


"Peo Sjoblom" wrote:

Try

=SUMPRODUCT(--(A1:A3))

or array enter (ctrl + shift & enter)

=SUM(--(A1:A3))


--

Regards,

Peo Sjoblom

"tjtjjtjt" wrote in message
...
Using Excel 2002 SP3...

If I type logical values into the formula, like this: =SUM(TRUE, TRUE,
TRUE), my formula returns the value 3.
If I reference cells containing logical values, like this =SUM(A1:A3), my
formula returns 0.
Does anybody know why there is a difference?
--
tj