How to get average of percentages in a column with filtered cells and excluding zero

simonedeane1986

New Member
Joined
Mar 14, 2024
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hello Brains Trust!
I have a spreadsheet where i'm calculating, among other things, percentages down a column. I need to filter the various other columns against differing criteria with simple drop down filters.
Most cells in this percentage column will have a number, but some are zero.
I have managed to average all cells in the column and exclude the zeros using the formula =AVERAGEIFS(N5:N250,N5:N250,"<>0")
However, i would also like to be able to calculate what the average percentage of this column is when the other columns are filtered, whilst excluding any zero values.
(I can give a filtered average using the SUBTOTAL(1) function, but this still includes the zero values)
I cannot seem to find a way to do this?
Does anyone know of a solution to this problem?
Thanks!
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Hi Simone

In this example rows 3 and 6 are filtered.
The formula in column B is in B2:12.

Mappe2
ABCDEF
1NumberFilterexcl. 0excl. 0 and filtered items
218123,11111124,571429
4191
501
7331
801
9231
10331
11141
12321
Tabelle1
Cell Formulas
RangeFormula
E2E2=AVERAGEIFS(A2:A12,A2:A12,"<>0")
F2F2=AVERAGEIFS(A2:A12,A2:A12,"<>0",B2:B12,1)
B2,B4:B5,B7:B12B2=SUBTOTAL(3,A2)
 
Upvote 0
Another option
Excel Formula:
=AVERAGE(FILTER(N2:N250,(N2:N250<>0)*(MAP(N2:N250,LAMBDA(m,SUBTOTAL(103,m))))))
 
Upvote 0

Forum statistics

Threads
1,215,076
Messages
6,122,987
Members
449,093
Latest member
Mr Hughes

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