Calculate average excluding 0 and negative numbers

sheikhowais

New Member
Joined
Jul 13, 2012
Messages
16
Hi ,

I have a column of data that includes positive numbers, negative numbers and zeroes. i tried different formulas,
like =SUMIF(G5:G9,">=0")/COUNTIF(G5:G9,">=0")
=AVERAGEIF(G5:G16,"<>0")
but I cant seem to get an average excluding both the zeroes and negative numbers.

I tried your
[FONT=&quot]WorkbookExcelMagicTricks686-697[/FONT][FONT=&quot]StartFile&FinishedFile (.xlsx file format) but the formula takes 3 columns of data , when i tried to adjust it to one column it gives me wrong data

Given Formula
=AVERAGE(LARGE((A7:A15,C7:C15,E7:E12,G7:G27),ROW(INDIRECT("1:"&INDEX(FREQUENCY((A7:A15,C7:C15,E7:E12,G7:G27),{0}),2)))))
i want the above formula for only 1 column

[/FONT]
Does anyone have an idea how to make this work in Excel ? Thanks!


 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
When you put =AVERAGEIF(G5:G16,"<>0") couldn't you just rewrite this as =AVERAGEIF(G5:G16,">0") ?
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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