Average without Min Max and zero

Glenn_2008

New Member
Joined
Dec 16, 2008
Messages
14
Hi,

I've been using a sumproduct formula to get average without min and max value, but i can't figure out how also to exclude all cells in the same range where i have 0 as a value.

is the formula i use
=SUMPRODUCT((A14:G14<>MAX(P14:AA14))*(A14:G14<>MIN(A14:G14)),A14:G14)/SUMPRODUCT((A14:G14<>MAX(A14:G14))*(A14:G14<>MIN(A14:G14)))

Many thanks for your support.
Glenn
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Hi,

I've been using a sumproduct formula to get average without min and max value, but i can't figure out how also to exclude all cells in the same range where i have 0 as a value.

is the formula i use
=SUMPRODUCT((A14:G14<>MAX(P14:AA14))*(A14:G14<>MIN(A14:G14)),A14:G14)/SUMPRODUCT((A14:G14<>MAX(A14:G14))*(A14:G14<>MIN(A14:G14)))

Many thanks for your support.
Glenn

Excluding 0 values is regarded as mathematically unsound when averaging negative and positive values. That said:

Control+shift+enter, not just enter:

=TRIMMEAN(IF(A14:G14,A14:G14),2/COUNT(1/A14:G14))
 
Upvote 0

Forum statistics

Threads
1,214,793
Messages
6,121,619
Members
449,039
Latest member
Mbone Mathonsi

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