A | B | C | D | |
---|---|---|---|---|
1 | Name | Category | Positive / Negative | Number |
2 | AA | x | Positive | 103503253.7 |
3 | BB | x | Negative | 42125221.42 |
4 | CC | y | Positive | 85401512.22 |
5 | DD | z | Positive | 30600783.38 |
6 | EE | y | Negative | 32698328.06 |
7 | FF | y | Positive | 36048545.1 |
8 | GG | y | Positive | 993354.51 |
9 | HH | x | Negative | 774600.81 |
10 | II | z | Positive | 10420490.23 |
11 | JJ | z | Positive | 23557656.72 |
12 | KK | x | Negative | 1141258.86 |
13 | LL | z | Positive | 1162261.71 |
14 | MM | x | Positive | 1170530.17 |
15 | NN | y | Negative | 92860585.07 |
<THEAD>
</THEAD><TBODY>
</TBODY>
I would like to build a function counting quantity (countif/countifs) of "name" for each category, only "positive" which sum ( each category ) will be over 80%
E.g.
Category X = 1
Because
=sumifs($D$4:$D$17;$B$4:$B$17;B20;$C$4:$C$17;$C$4) => category "X" and "Positive"
104673783,91 * 0,8 = 83739027,128
and
103 503 253,74</SPAN> > 83739027,128
so only 1 name gave over 80%
X = 1 AA
Y = 2 CC,FF
Z = 2 DD,JJ
Reasuming I need to check how many numbers need to be added so the sum will greater than 80% of the category sum.