How to Count Number of Cells that Contain Errors in Excel

This post will guide you how to count the number of cells that contain errors within a range of cells using a formula in Excel 2013/2016.You can easily to count cells equal to a specific value or text string through COUNTIF function. But if there is an easy way to count cells contain errors in your data range.

Count Number of Cells that Contain Errors


You should know that there are several types of errors such as: #N/A, #REF! or #VALUE! In Excel. And you only want to count the number of all types of errors with a formula in Excel. This tutorial will show you how to count the number of cells in a specified range of cell A1:B6 that contain errors using an Excel formula ,with the SUMRODUCT and ISERROR functions. Like below:

=SUMPRODUCT(–ISERROR(A1:B6))

count number cells that contain errors1

Note: A1:B6 is the range from which to count the cells that contain errors.

LET’S SEE THAT HOW THIS FORMULA WORKS:

The SUMPRODUCT function can be used to multiply the corresponding components in the given arrays. If there is only one array, SUMPRODUCT function would return the sum of values in the array.

=ISERROR(A1:B6)

count number cells that contain errors2

The ISERROR function is used to identify the cells that contain an error. And returns True if cell contain any error values. In this case, ISERROR function returns an array that contain TRUE or FALSE values, like this:

={FALSE,FALSE;FALSE,FALSE;FALSE,TRUE;TRUE,FALSE;FALSE,FALSE;FALSE,TRUE}

count number cells that contain errors3

=–ISERROR(A1:B6)

count number cells that contain errors4

You still need to convert the TRUE or FALSE values to number 1 and 0 by using a double negative operator. And the result array looks like this:

{0,0;0,0;0,1;1,0;0,0;0,1}

count number cells that contain errors5

The SUMPRODUCT function would add the value of the above array and return the final result.

x
How to Create Dynamic Interactive Charts in Excel

You can also use another array formula based on the SUM function, IF function and ISERROR function to count the number of all types of errors in a range in Excel. Like this:

{=SUM(IF(ISERROR(A1:B6),1))}

count number cells that contain errors6

Note: you need to press CTRL + SHIFT + ENTER short keys to covert its as a array formula.

Related Functions


  • Excel SUMPRODUCT function
    The Excel SUMPRODUCT function multiplies corresponding components in the given one or more arrays or ranges, and returns the sum of those products. The syntax of the SUMPRODUCT function is as below:= SUMPRODUCT (array1,[array2],…)…
  • Excel COUNTIF function
    The Excel COUNTIF function will count the number of cells in a range that meet a given criteria. This function can be used to count the different kinds of cells with number, date, text values, blank, non-blanks, or containing specific characters.etc.= COUNTIF (range, criteria)…
  • Excel IF function
    The Excel IF function perform a logical test to return one value if the condition is TRUE and return another value if the condition is FALSE. The IF function is a build-in function in Microsoft Excel and it is categorized as a Logical Function.The syntax of the IF function is as below:= IF (condition, [true_value], [false_value])….
  • Excel ISERROR function
    The Excel ISERROR function used to check for any error type that excel generates and it returns TRUE for any error type, and the ISERR function also can be checked for error values except #N/A error, it returns TRUE while the error is #N/A. The syntax of the ISERROR function is as below:= ISERROR (value)….
  • Excel SUM function
    The Excel SUM function will adds all numbers in a range of cells and returns the sum of these values. You can add individual values, cell references or ranges in excel.The syntax of the SUM function is as below:= SUM(number1,[number2],…)…

 

Related Posts

Case Sensitive Lookup with SUMPRODUCT and EXACT

Today, we will show you how to use SUMPRODUCT and EXACT to perform a case sensitive exact match. In this article, we provide a simple example to calculate bonus for employees whose names are case-sensitive. If you meet similar scenarios ...

Average per Week by Formula in Excel
Average per Week 1

We usually apply AVERAGE function or relevant functions to return average directly in Excel worksheet. But in some situations, only applying average relevant functions cannot figure out our problem. Sometimes we can create a formula with functions and mathematical operation ...

How to Sum if Equal to Many Items or A Range in Excel
How to Sum if Equal to Many Items 12

If we want to sum numbers from a range with criteria, we often select SUMIF of SUMIFS functions as the first choice to create a formula. The criteria can be a number or an array or a collection of some ...

How to Sum if Equal to X or Y in Excel
How to Sum if Equal to X or Y 19

In daily work, if we want to sum numbers from a range, and only sum the numbers which being equal to X or Y in the range, we can create a formula with Excel build-in functions to get the result. ...

How To Sum the Largest N Values in Excel

Sometimes we may want to sum the largest N numbers or top N numbers in a range. In this article, we will show you the method of “SUM the Largest N Numbers” by a simple formula which consist of SUMPRODUCT ...

How to Sum for Cell Contains Formula Only in Excel
How to Sum for Cell Contains Formula Only in Excel 9

Sometimes values are created by formulas in cells. If we want to sum values which are created by formulas from a range, but some values which are hardcoded also list in the same range, how can we filter out matched ...

How to Sum the Smallest N Values in Excel
How to Sum the Smallest N Values in Excel 15

Sometimes we may want to sum the first smallest N numbers in a range in Excel. In this article, we will show you the method of “SUM the Smallest N Numbers” by a simple formula which consist of SUMPRODUCT and ...

How to Sum by SUMPRDUCT with One Specific Criteria Multiple Columns in Excel
How to Sum by SUMPRDUCT with One Specific Criteria Multiple Columns in Excel1

Sometimes we may meet the case that to sum numbers based on one specific criteria. In this article, we will show you the method to resolve this problem by formula with the help of Excel SUMPRODUCT function. SUMPRODUCT can filter ...

How to Sum by SUMPRDUCT with Specific Criteria in Excel
How to Sum by SUMPRDUCT with Specific Criteria in Excel 15

Sometimes we may meet the case that to sum numbers based on two or more specific criteria. In this article, we will show you the method to resolve this problem by formulas with the help of Excel SUMPRODUCT function. SUMPRODUCT ...

How to Count Unique Numeric Values in a Range in Excel
count unique numberic values7

This post will guide you how to count unique numeric values in the given range in Excel 2013/2016 or Excel office 365. How do I count the unique numeric values in a list of data with some duplicate values using ...

Sidebar