Note: this is an array formula, and must be entered with control + shift + enter. The formulas in F7 and F8 return the same result, but have different approaches. In cell F7, we have the following formula, using a nested IF approach: This is how Excel evaluates the IFs inside SUM: In essence, each IF “filters” values into the next IF, and only quantities where all three logical tests return TRUE “survive” the operation. Other quantities become FALSE and are evaluated by SUM as zero. The final result inside SUM is an array of values like this: FALSE values evaluate to zero, and the SUM function returns a final result of 18. In F8 we have this formula, which uses a single IF and boolean logic: Each logical expression returns a an array of TRUE and FALSE values. When these arrays are multiplied together, the math operation coerces values to ones and zeros in a single array like this: The array of 1s and 0s filters out irrelevant data, and the same result delivered to SUM: As before, SUM returns a final result of 18.

Dave Bruns

Hi - I’m Dave Bruns, and I run Exceljet with my wife, Lisa. Our goal is to help you work faster in Excel. We create short videos, and clear examples of formulas, functions, pivot tables, conditional formatting, and charts.