Average Functin

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do you average a column that contains formulas, when some of the formula
results are zero?
 
I'm assuming you want to ignore 0 values?

In that case, =SUM(A1:A10)/COUNTIF(A1:A10,">0")

This divides the sum of A1:A10 by the count of values in A1:A10 which are
greater than zero.

Dave
 
Todd,

You could try sum / sumproduct. Ex. =SUM(A1:E1)/(SUMPRODUCT((A1:E1<>0)*1))
 
Tod...do you expect results from zero to positive numbers only, no blank
results??
 
=AVERAGE(IF(A1:A100<>0,A1:A100))

which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter.
Excel will automatically enclose the formula in braces (curly brackets), do
not try to do this manually.
When editing the formula, it must again be array-entered.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
Nielz....when the divisor consider the count of negative number, then the
zero must be included in the count for the divisor....what do you think?
 
Thanks a lot. It worked.
--
Todd


Dave F said:
I'm assuming you want to ignore 0 values?

In that case, =SUM(A1:A10)/COUNTIF(A1:A10,">0")

This divides the sum of A1:A10 by the count of values in A1:A10 which are
greater than zero.

Dave
 
Thank you.
--
Todd


Bob Phillips said:
=AVERAGE(IF(A1:A100<>0,A1:A100))

which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter.
Excel will automatically enclose the formula in braces (curly brackets), do
not try to do this manually.
When editing the formula, it must again be array-entered.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
Tod this one assumes the average of formula result (not considering
#N/A,#DIV...etc)

Formula Result assumed only with some blank(""), some zero (0), and some
(+/-) numbers..

simply...=sum(a1:a10)/counta(a1:a10)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top