A | B | C | D | |
---|---|---|---|---|
Name | Category | Positive / Negative | Number | |
AA | x | Positive | ||
BB | x | Negative | ||
CC | y | Positive | ||
DD | z | Positive | ||
EE | y | Negative | ||
FF | y | Positive | ||
GG | y | Positive | ||
HH | x | Negative | ||
II | z | Positive | ||
JJ | z | Positive | ||
KK | x | Negative | ||
LL | z | Positive | ||
MM | x | Positive | ||
NN | y | Negative |
<THEAD>
</THEAD><TBODY>
[TD="align: center"]1[/TD]
[TD="align: center"]2[/TD]
[TD="align: right"]103503253.7[/TD]
[TD="align: center"]3[/TD]
[TD="align: right"]42125221.42[/TD]
[TD="align: center"]4[/TD]
[TD="align: right"]85401512.22[/TD]
[TD="align: center"]5[/TD]
[TD="align: right"]30600783.38[/TD]
[TD="align: center"]6[/TD]
[TD="align: right"]32698328.06[/TD]
[TD="align: center"]7[/TD]
[TD="align: right"]36048545.1[/TD]
[TD="align: center"]8[/TD]
[TD="align: right"]993354.51[/TD]
[TD="align: center"]9[/TD]
[TD="align: right"]774600.81[/TD]
[TD="align: center"]10[/TD]
[TD="align: right"]10420490.23[/TD]
[TD="align: center"]11[/TD]
[TD="align: right"]23557656.72[/TD]
[TD="align: center"]12[/TD]
[TD="align: right"]1141258.86[/TD]
[TD="align: center"]13[/TD]
[TD="align: right"]1162261.71[/TD]
[TD="align: center"]14[/TD]
[TD="align: right"]1170530.17[/TD]
[TD="align: center"]15[/TD]
[TD="align: right"]92860585.07[/TD]
</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.