SUMIF cannot handle more than one condition.
I'd suggest using Pivot tables for this task.
Otherwise, build a list of products in a column, say, E from E2 on and a list of warehouses in row 1 from F1 on.
In F2 enter: =SUMPRODUCT(($A$1:$A$100=$E2)*($B$1:$B$100=F$1),($C$1:$C$100))
Copy this across then down. It will give you the desired totals.
I assumed the data to be in A1:C100, where A1:A100 houses products, B1:B100 warehouses, and C1:C100 associated quantities.
Aladin
{=SUM(('Product'="ABC")*('Warehouse'=1)*'Qty')}
Note: This is an array formula which must be
entered using the Control+Shift+Enter key
combination. The outermost braces, {}, are not
entered by you -- they're supplied by Excel in
recognition of a properly entered array formula.
I'd suggest using Pivot tables for this task. Otherwise, build a list of products in a column, say, E from E2 on and a list of warehouses in row 1 from F1 on. In F2 enter: =SUMPRODUCT(($A$1:$A$100=$E2)*($B$1:$B$100=F$1),($C$1:$C$100)) Copy this across then down. It will give you the desired totals. I assumed the data to be in A1:C100, where A1:A100 houses products, B1:B100 warehouses, and C1:C100 associated quantities. Aladin
Thanks Mark and Aladin, both formulas worked but they lack the wildcard capability. Any suggestions.
=SUMPRODUCT((ISNUMBER(SEARCH("ur",B1:B3)))*(A1:A3="anb"),C1:C3)
is an example how you can use wild card capability.
Strings like "?ur" or "*ur*" within SEARCH will work.
Aladin
{=SUM(ISNUMBER(MATCH("*ap*",Product,0))*(Warehouse=1)*Qty)} : SUMIF cannot handle more than one condition. : I'd suggest using Pivot tables for this task. : Otherwise, build a list of products in a column, say, E from E2 on and a list of warehouses in row 1 from F1 on. : In F2 enter: =SUMPRODUCT(($A$1:$A$100=$E2)*($B$1:$B$100=F$1),($C$1:$C$100)) : Copy this across then down. It will give you the desired totals. : I assumed the data to be in A1:C100, where A1:A100 houses products, B1:B100 warehouses, and C1:C100 associated quantities. : Aladin :