# 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
###### Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Commented:
Try this -

=AVERAGEIF(A1:A10,">0")
0
Commented:
you can use

=AVERAGEIF( A1:A10 , "<>0")
0

Experts Exchange Solution brought to you by

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Commented:
duttcom you beat me by 1.20 :-(  but mine allows for not zero i.e. minus ;-)
0
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
Commented:
Ah- but you used "<>0" which is more correct if there are going to be negative values!
0
Author 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
Author Commented:
thanks to all
0
Commented:
No assist points? Oh well...
0
Author Commented:
Assist point? Did not know we could give assist points. I do now - thanks for letting me know.
0
###### It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.