Coorect way to average

Folks,
In A1:A10 there are 8 values (2,4,6,8,10,12,14,16) and 2 cells with zero in each.
The average should be 9. The average I'm getting is 7.2. How does one average with zero value(s) that you do no want to be included in the average
Frank FreeseAsked:
Who is Participating?
 
chilternPCConnect With a Mentor Commented:
you can use

=AVERAGEIF( A1:A10 , "<>0")
0
 
duttcomCommented:
Try this -

=AVERAGEIF(A1:A10,">0")
0
 
chilternPCCommented:
duttcom you beat me by 1.20 :-(  but mine allows for not zero i.e. minus ;-)
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
John HurstBusiness Consultant (Owner)Commented:
If the cells are mathematically and legitimately zero then the average is 7.2. That is just standard mathematics.

If the cells are not relevant and just there then the formula provided above is what you need.
0
 
duttcomCommented:
Ah- but you used "<>0" which is more correct if there are going to be negative values!
0
 
Frank FreeseAuthor Commented:
John,
You'd be correct if zero was part of the data stream. In this instance zero simply means that there was nothing in a particular month which would not would not be out of the ordinary.
I'd forgot that a negative value needs to be included. Although duttcome had a great solution, I'm going to go with chilternPC on this one.
0
 
Frank FreeseAuthor Commented:
thanks to all
0
 
duttcomCommented:
No assist points? Oh well...
0
 
Frank FreeseAuthor Commented:
Assist point? Did not know we could give assist points. I do now - thanks for letting me know.
0
All Courses

From novice to tech pro — start learning today.