Note: this is an array formula, and must be entered with control + shift + enter.
Note: This example demonstrates how to replace a nested IF formula with a single IF in an array formula using boolean logic. This technique can be used to reduce complexity in complex formulas. However, the example is for illustration only. This particular problem could be easily solved with SUMIFS or SUMPRODUCT.
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:
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:
The IF function runs a logical test and returns one value for a TRUE result, and another for a FALSE result. For example, to "pass" scores above 70: =IF(A1>70,"Pass","Fail"). More than one condition can be tested by nesting IF functions. The IF...
Formulas are the key to getting things done in Excel. In this accelerated training, you'll learn how to use formulas to manipulate text, work with dates and times, lookup values with VLOOKUP and INDEX & MATCH, count and sum with criteria, dynamically rank values, and create dynamic ranges. You'll also learn how to troubleshoot, trace errors, and fix problems. Instant access. See details here.