Averaging, ignoring zeros

B

Bob Phillips

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

This is an array formula, so commit with Ctrl-SHift-Enter.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
J

Jason Morin

Just an alternative to the typical AVERAGE array formula:

=SUM(1:1)/SUM(COUNTIF(1:1,{"<>","*",0})*{1,-1,-1})

HTH
Jason
Atlanta, GA
 
H

Harlan Grove

Peo Sjoblom wrote...
=AVERAGE(IF(A1:D1<>0,A1:D1))

entered with ctrl + shift & enter
....

Normal caveats with respect to continuity - if there could be positive
and negative values, zero values should be included. If only positive
values should be included in averages, that should be made explicit,
i.e.,

=AVERAGE(IF(A1:D1>0,A1:D1))
 

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

Top