2016-12-29 74 views
1

我有SUMPRODUCT硬編碼值的工作,但我想在我的例子中使用通配符B clomun。SUMPRODUCT與通配符

這裏是我的數據

+----------+----------+-----------+ 
| A COLUMN | B COLUMN | C COLUMN | 
+----------+----------+-----------+ 
| Status | Fruit | Quanitity | 
|   |   |   | 
| Fresh | Apple | 6   | 
|   |   |   | 
| Fresh | Apricot | 7   | 
|   |   |   | 
| Stale | Apple | 4   | 
+----------+----------+-----------+ 

我想匹配FreshAP*再總結比賽形成列C.

我有以下

=SUMPRODUCT(--($B$2:$B$840="AP*"),--($A$2:$A$840="Fresh"),$C$2:$C$840) 

與工作代碼通配符但計數爲關

=SUMPRODUCT(ISNUMBER(SEARCH"AP",$B$2:$B$840,1))*($A$2:$A$840="Fresh")*($C$2:$C$840)) 

回答

2

SUMPRODUCT()函數不支持數組類型表達式中的通配符。

=SUMPRODUCT((A2:A1000="Fresh")*(LEFT(B2:B1000,2)="Ap")*(C2:C1000)) 

enter image description here

:同樣的結果可以與實現