View Single Post
  #5   Report Post  
Harlan Grove
 
Posts: n/a
Default

"Aladin Akyurek" wrote...
1]

=SUM(G34:V34)/MAX(1,COUNT(G34:V34)-COUNTIF(G34:V34,0))


Fine if values in the range would only be nonnegative. If values could be
negative as well as positive, then they almost certainly could be zero as
well. In other words, it should be sufficient to average only the positive
values. Also, if there were no numbers at all in the range, should the
result be 0?

An alternative.

=IF(COUNTIF(A1:A10,"0"),AVERAGE(IF(A1:A100,A1:A1 0)),"")


2]

=IF(COUNT(G34:V34)5,AVERAGE(LARGE(G34:V34,{1,2,3 ,4,5})),AVERAGE(G34:V34))


Returns #DIV/0! if there are no numbers in range. An array formula
alternative.

=IF(COUNT(A1:A10),AVERAGE(LARGE(A1:A10,
ROW(INDIRECT("1:"&MIN(COUNT(A1:A10),5))))),"")