Why it works
- What it does
- Two SUMIFs added together count a row twice when it matches both rules. In SUMPRODUCT, add the tests: the sum is 1 or 2 when at least one passes. Asking whether it is above 0 turns that into a single yes, so every row counts once.
- The shape of the formula
- =SUMPRODUCT(((test1)+(test2)>0)*values)
- How to remember it
- Plus is OR, times is AND; >0 keeps OR from counting twice.
- The usual mistake
- SUMIF plus SUMIF for an OR rule. Rows that match both are added twice.
Keep practicing
- SUMPRODUCT: multiply row by row, then addHow do I get the total value of stock from quantity and unit cost?Open
- IF with AND and ORHow do I mark orders that ship free only to some states above a minimum?Open
- SUMPRODUCT with AND: compare two columnsHow do I total freight for East deliveries that arrived after the promised date?Open
Updated