excluding valuse from an average

G

Guest

I am setting up a tracking spread sheet and I would like to be able to
average the weekly values and then average this for a monthly and a
cumulative monthly average. The problem that I am having is there are
certain weeks that there won't be any values. Is there a way to exclude
these reading ( I am calling them "0" in this spread sheet ) and still be
able to use the average function?
Thanks in advance for any and all help in this matter
 
G

Guest

Enter this an array formula Ctrl+Shift+Enter

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

or enter as normal:

=SUM(A1:A100)/(COUNTIF(A1:A100,">0")+COUNTIF(A1:A100,"<0"))

HTH
 

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