Removing zero values from an average equation

Dan012

New Member
Joined
Jun 25, 2011
Messages
9
Hi everyone,

I am trying to perform an average calculation at the end of a column and my issue is that the column e.g H3:H12 contains zero values as a default from another formula. This is causing the problem where for example the column only contains three real entries (other than zero), instead of diving the sum by three to return the true average it is dividing the sum by 10 (the number of rows in the section) and returning an incorrect answer.

I want to perform the average calculation based only on the cells that have a value greater than zero.

Thanks for any help you can provide.
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Hi everyone,

I am trying to perform an average calculation at the end of a column and my issue is that the column e.g H3:H12 contains zero values as a default from another formula. This is causing the problem where for example the column only contains three real entries (other than zero), instead of diving the sum by three to return the true average it is dividing the sum by 10 (the number of rows in the section) and returning an incorrect answer.

I want to perform the average calculation based only on the cells that have a value greater than zero.

Thanks for any help you can provide.
What version of Excel are you using?

Will there be any negative numbers in the range?
 
Upvote 0
Thank you for your help, i managed to find the solution from the previous posts. Thanks again.
 
Upvote 0
Hi everyone,

I am trying to perform an average calculation at the end of a column and my issue is that the column e.g H3:H12 contains zero values as a default from another formula. This is causing the problem where for example the column only contains three real entries (other than zero), instead of diving the sum by three to return the true average it is dividing the sum by 10 (the number of rows in the section) and returning an incorrect answer.

I want to perform the average calculation based only on the cells that have a value greater than zero.

Thanks for any help you can provide.

In addition to the links Trebor76 quotes:

If on Excel 2007 or later, you can invoke:

=AVERAGEIF(H3:H12,">0",H3:H12)

Or, in case there would be no values above 0's...

=IFERROR(AVERAGEIF(H3:H12,">0",H3:H12),0)
 
Upvote 0
Aladin Akyurek said:
In addition to the links Trebor76 quotes:

If on Excel 2007 or later, you can invoke:

=AVERAGEIF(H3:H12,">0",H3:H12)

Or, in case there would be no values above 0's...

=IFERROR(AVERAGEIF(H3:H12,">0",H3:H12),0)
When the range and the average_range are the same there's no need to repeat it.

=AVERAGEIF(H3:H12,">0")

=IFERROR(AVERAGEIF(H3:H12,">0"),0)
 
Upvote 0

Forum statistics

Threads
1,224,599
Messages
6,179,828
Members
452,946
Latest member
JoseDavid

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top