SUMPRODUCT accepts one or more arrays, multiplies the arrays together, and returns the "sum of products" as a final result. If only one array is supplied, SUMPRODUCT simply returns the sum of items in the array.
The ISERROR function returns TRUE when a cell contains an error, and FALSE if not. In the example, ISERROR receives a range of cells (B5:B9) as input. Because there are five cells in the range, ISERROR evaluates each cell and returns five results in an array of TRUE / FALSE values:
To coerce the TRUE/FALSE values to 1's and 0's, we use a double negative (called a double unary). The resulting array looks like this:
Finally, SUMPRODUCT sums the items in this array and returns the total, which is 3 in this case.
Note: ISERROR counts all errors. If for some reason you want to count all errors except #N/A, you can use the ISERR function instead.
Array formula with SUM
You can also use the SUM function to count errors, but you must enter as an array formula using control + shift + enter. Once entered the formula will look like this:
The SUMPRODUCT function multiplies ranges or arrays together and returns the sum of products. This sounds boring, but SUMPRODUCT is an incredibly versatile function that can be used to count and sum like COUNTIFS or SUMIFS, but with more...
The Excel ISERROR function returns TRUE for any error type excel generates, including #N/A, #VALUE!, #REF!, #DIV/0!, #NUM!, #NAME?, or #NULL! You can use ISERROR together with the IF function to test for errors and display a custom message, or...
The Excel ISERR function returns TRUE for any error type except the #N/A error. You can use the ISERR function together with the IF function to test for an error and display a custom message, or perform a different calculation if found.
Excel Formula Training
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.