View Single Post
  #4   Report Post  
hgrove
 
Posts: n/a
Default


duane wrote...
one way -

=SUMPRODUCT((A1:A12<0)*(A1:A12))/COUNTA(A1:A12)

...

Exactly backwards. 1 + 2 + 3 = 1 + 2 + 3 + 0 + 0 + 0 . . ., so there's
no benefit to excluding zeros from the sum. On the other hand, you need
to exclude zeros from the count. So

=SUM(A1:A12)/COUNTIF(A1:A12,"0")

Note also 0. If legitimate values could be negative or positive, then
they could also be zero.


--
hgrove
------------------------------------------------------------------------
hgrove's Profile: http://www.excelforum.com/member.php...o&userid=11432
View this thread: http://www.excelforum.com/showthread...hreadid=275766