Home » excel » excel – Counting per blocks of columns with a certain condition

# excel – Counting per blocks of columns with a certain condition

Questions:

I have 2 main columns Employee Number and Sales agent number. Each Employee can have 1 or more sales agents associated with them, and each of these sales agents under a particular employee have a certain bonus split. Now, I’m trying to calculate a fourth column Final_bonus_split, with the values in this column being a weight of their respective agents bonuses per every employee number. For example, as follows:

``````Emp#    Sales_Agent#    Bonus_Split   Final_bonus_split
1000     123             10%          =10/(10+25+30) =  15%
1000     345             25%          =25/(10+25+30) =  38%
1000     987             30%          =30/(10+25+30) =  47%
2000     123             10%          =10/10         = 100%
3000     345             50%          =50/(50+15)    =  77%
3000     647             15%          =15/(50+15)    =  23%
4000     634             40%          =40/40         = 100%
``````

I’m currently doing this using 2 helper columns, but was wondering if it’s possible to do this using just a single column.

``````=C2/SumIf(\$A\$2:\$A\$8;A2;\$C\$2:\$C\$8)