SUM IF with conditions in another column
"bj" wrote in message
...
Check also sumproduct() for more complicated structures
=sumproduct(--(and(b5:b317=criteria1,b5:b317=criterian2)),--(c5:c3170.5),c5:c317)
You don't do ANDs in SP like that, you use
--(B5:B317=criteria1),--(B5:B317=criteria2)
but that is actually nonsensical because a cell cannot be two different
values, so you probably mean OR, wich is done as
=SUMPRODUCT(--((B5:B317=criteria1)+(B5:B317=criteria2)),--(C5:C3170.5),C5:C317)
|