2017-04-06 55 views
0

我基本上想有條件地總結所有具有相同客戶名稱的行。但我想乘以物品價格和訂單數量以獲得總訂單價格。我有一個這樣的公式:在Google表格中,我如何SumIf 2列的乘積

=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
=SUMPRODUCT(--(Orders!A$2:A$100=A2),Orders!D$2:D$100,Orders!H$2:H$100)