Average non zero values

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

Guest

I recall reading this and now cant find it.
A column of data with numerical values, some empty cells and some with zero's.
I need to calculate the average, but supress cells with zeros from the
calculation.

I tried =IF((A1:A44)<>0,AVERAGE(A1:A44)) arrayed entered, but no go.

Suggestions welcomed, and my thanks.
Paul
 
Your formula works as long as it is array-entered. Are you sure
you've array entered it? What result do you get?


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
I believe the OP has to change it to

=AVERAGE(IF(A1:A44<>0,A1:A44))

--

Regards,

Peo Sjoblom

Excel 95 - Excel 2007
Northwest Excel Solutions
www.nwexcelsolutions.com
"It is a good thing to follow the first law of holes;
if you are in one stop digging." Lord Healey
 
That was my initial thought -- the extra parentheses -- but the
formula worked both with and without the parens.I tested in Excel
2003. Perhaps an earlier version would have problems with the
extra parens.



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
Thanks Peo, that does it.

Peo Sjoblom said:
I believe the OP has to change it to

=AVERAGE(IF(A1:A44<>0,A1:A44))

--

Regards,

Peo Sjoblom

Excel 95 - Excel 2007
Northwest Excel Solutions
www.nwexcelsolutions.com
"It is a good thing to follow the first law of holes;
if you are in one stop digging." Lord Healey
 
I believe it is the syntax, OP's formula is

=IF((A1:A44)<>0,AVERAGE(A1:A44))

which will work if A1 is neither zero nor blank, if A1 is blank or 0 it will
return FALSE
If the OP got FALSE he must have a zero in the first cell


--

Regards,

Peo Sjoblom

Excel 95 - Excel 2007
Northwest Excel Solutions
www.nwexcelsolutions.com
"It is a good thing to follow the first law of holes;
if you are in one stop digging." Lord Healey
 
Hi Folks,

I use Excel 2000 and only Peo's formula works correctly.

Cheers
 
And since 0 doesn't add to a sum:

=sum(a1:a44)/countif(a1:a44,"<>0")
 

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