列中的总和值如果其他两个列的差小于0,并且满足了额外的评论
| A | B | C | D | E |
--|-------------|------------|-----------------|----------------------|-------------|-
1 | Product | sales_plan | sales_actuals | purchase_quantity | |
2 | Product_A | 500 | 400 | 1200 | Product_B |
3 | Product_B | 800 | 900 | 3000 | 5000 |
4 | Product_B | 300 | 490 | 2000 | |
5 | Product_D | 900 | 820 | 7000 | |
6 | Product_D | 200 | 250 | 5000 | |
7 | Product_D | 700 | 600 | 4000 | |
智能引用答案此问题在单元格E3
我想总结 puploy_quantity
in 列d
a)如果sales_actuals> sales_plan
和
b)如果产品与单元格E2
中的条目匹配。
我试图使用此公式,但无法使它起作用:
=SUMPRODUCT((C2:C7>B2:B7)*D2:D7;A2:A7=E2)
我需要修改它以获取正确的值?
| A | B | C | D | E |
--|-------------|------------|-----------------|----------------------|-------------|-
1 | Product | sales_plan | sales_actuals | purchase_quantity | |
2 | Product_A | 500 | 400 | 1200 | Product_B |
3 | Product_B | 800 | 900 | 3000 | 5000 |
4 | Product_B | 300 | 490 | 2000 | |
5 | Product_D | 900 | 820 | 7000 | |
6 | Product_D | 200 | 250 | 5000 | |
7 | Product_D | 700 | 600 | 4000 | |
Wit reference to the answer in this question in Cell E3
I want to sum up thepurchase_quantity
in Column D
a) if the sales_actuals > sales_plan
and
b) if the product matches with the entry in Cell E2
.
I tried to go with this formula but could not make it work:
=SUMPRODUCT((C2:C7>B2:B7)*D2:D7;A2:A7=E2)
How do I need to modify it to get the correct value?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如您在评论中所见,JVDV的答案正在工作:
As you can see in the comments the answer from JvdV is working: