Excel: Count top % values excluding "0" zeros from range

493 views Asked by At

I have this formula:

  =COUNTIFS(G2:G219,">"&PERCENTILE.EXC(G2:G219,0.9),G2:G219,">0")

In G2:G219 I have a list of random numbers (including zeros). I would like to count how many of these numbers are in top 10% percintile, excluding those that are 0.

The additional criteria that I've added G2:G219,">0" ,is not working. Any other ideas? filtering out and "0" and copying to another place is not a great option,as I have multiple columns and need zeros for other formulas.

1

There are 1 answers

3
David G On
  =COUNTIFS(G2:G219,">"&PERCENTILE.EXC(G2:G219,0.9),G2:G219,"<>0")

I just changed greater than 0 to not equal to 0. It works with this line I tested:

 =COUNTIFS(A1:A10;"<10";A1:A10;"<>0")

Looking at range A1 to A10 looking for numbers smaller than 10 but not equal to 0. You can parse your ranges in this one if modifying yours fails.