对具有特定条件的每列块进行计数

发布于 2024-10-23 14:38:06 字数 719 浏览 2 评论 0原文

我有 2 个主要栏“员工编号”和“销售代理编号”。每个员工可以有 1 个或多个与其关联的销售代理,并且特定员工下的每个销售代理都有一定的奖金分配。现在,我正在尝试计算第四列Final_bonus_split,该列中的值是每个员工人数各自代理奖金的权重。例如,如下所示:

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%

我目前正在使用 2 个辅助列来执行此操作,但想知道是否可以仅使用单个列来执行此操作。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

满天都是小星星 2024-10-30 14:38:06

这就是您正在寻找的吗:

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

Is that what you are looking for:

=C2/SumIf($A$2:$A$8;A2;$C$2:$C$8)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文