where sales is the named range C5:C16. The result is $5950, the sum of the values in the range C13:C16, which are created with a formula.
Forecasted values
The forecasted values in the range C13:C16 are created with a formula based on the MROUND function. The formula in C13, copied down, is: This formula is used to generate values that are 5% higher than the previous month, rounded to the nearest multiple of 25.
Sum formulas
To sum values in the range C5:C16 that are created with formulas, the formula in F6 is: This formula uses boolean logic to “filter” the numbers in sales (C5:C16) based on whether the values come from a formula or not. The ISFORMULA function created the filter like this: ISFORMULA returns TRUE when cell contains a formula, and FALSE if not. In this case, there are 12 values in the range C5:C16, so ISFORMULA returns 12 results in an array like this: Each TRUE value in this array represents a cell that contains a formula. Notice the last 4 values are TRUE. When this array is multiplied by the named range sales (C5:C16), the math operation coerces the TRUE and FALSE values to 1s and 0s. We can visualize the formula at this point like this: After the multiplication takes place, we have a single array like this: Now you can see how the filter works. The values not created by formulas are “zeroed out”. With just one array to process, SUMPRODUCT sums the array and returns a final result of 5950.
Not formulas
To sum values not generated by a formula, you can add the NOT function like this: This is the formula in cell F7. Here, the NOT function reverses the TRUE FALSE results returned by ISFORMULA function: This causes the formula-created values to be zeroed out: The final result from this formula is 9243.
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.