Go Back

How to Count Cells that Contain Errors

Read time: 29 minutes

We can Count Cells that Contain Errors in a range with a formula that combines the SUMPRODUCT and ISERROR functions. The steps below will walk through the process.

Figure 1: How to Count Cells that Contain Errors

General Formula:




Setting up the Data

  • We will set up the data by inputting the DATA into Column B
  • Cell C4 in Column C is where we want the formula to return the result for the number of cells with errors

Figure 2: Setting up the Data

Count Cells that Contain Errors

  • We will click on Cell C4
  • We will insert the formula below into the cell
  • We will press the enter key

Figure 3: Count of Errors in Range B4:B11


The ISERROR function checks the range if they contain errors. The result is returned as an array of TRUE or FALSE.


TRUE represents the cells with errors and is converted to 1 so that the array looks like this: 


The result of this array is then multiplied by 1 and the result is summed and returned as the result by the SUMPRODUCT Function.


We can use the SUM function instead of SUMPRODUCT function. However, we need to enter as an array formula using CTRL + SHIFT + ENTER. The formula is:


ISERROR function counts all errors. If you use ISERR function, it will exclude #N/A

Instant Connection to an Expert through our Excelchat Service

Most of the time, the problem you will need to solve will be more complex than a simple application of a formula or function. If you want to save hours of research and frustration, try our live Excelchat service! Our Excel Experts are available 24/7 to answer any Excel question you may have. We guarantee a connection within 30 seconds and a customized solution within 20 minutes.

Did this post not answer your question? Get a solution from connecting with the expert.

Another blog reader asked this question today on Excelchat:
Here are some problems that our users have asked and received explanations on

I want Excel to count a range of cells that contain specific data
Solved by B. L. in 13 mins
I need to count and sum the cells with any value in them. These same cells already contain a formula. How do i get my countif function to ignore the formula and count only those cells that contain a value?
Solved by K. H. in 21 mins
Help please. I have two sheets, one contains a column that has a list of common errors, the other has a column from a log file that has all the errors. I need something that will check through all the errors and return a count of lines that do NOT contain any text from the common errors. In other words lines that have unknown errors. Additionally it would be useful to highlight the lines in all the errors to show unrecognized errors in red. Any ideas?
Solved by T. L. in 29 mins

Leave a Comment