在Google Sheet中,我如何将2列乘积的Sumif相乘

时间:2017-04-06 05:18:21

标签: google-sheets

我基本上想要有条件地将所有具有相同客户名称的行相加。但我希望将物品价格和订单数量相乘以获得总订单价格。我有一个这样的等式:

=SUMIF(Orders!A$2:A$100,A2, MULTIPLY( Orders!H$2:H$100,Orders!D$2:D$100))

其中:

Orders!A$2:A$100 is the Customer Name Column
A2 is the current Customer Name Criteria
Orders!H$2:H$100 is the Order Price
Orders!D$2:D$100 is the Order Count

遗憾的是,这不起作用,我该怎么做?

1 个答案:

答案 0 :(得分:1)

=SUMPRODUCT(--(Orders!A$2:A$100=A2),Orders!D$2:D$100,Orders!H$2:H$100)