Count the number of errors in range

Working with extensive Excel data often involves spotting and managing errors. In this lesson, you’ll discover two methods for counting errors in your spreadsheet.

Using SUM and IF with ISERROR

To count the number of errors in Excel, you can use such a formula:


A1:E1000 – this is a range of your data. You can change this part of the formula to suit your worksheet.

It’s an array formula, so press CTRL + SHIFT + ENTER.

count number of errors

Note: This formula counts all errors, not specific error types.

Using COUNTIF Formula

To count errors within a range, rely on the COUNTIF formula:

  1. Select the cell where you want the count to appear.
  2. Type “=COUNTIF(“, followed by the range that you want to count errors in.
  3. Add a comma and specify the error type, like “#N/A,” “#VALUE!,” or “#REF!” in quotation marks.
  4. Close the parentheses and press Enter.

Example: For counting #N/A errors in range A1:A10, the formula would be: =COUNTIF(A1:A10,”#N/A”)

Note: You can count different error types by adjusting the formula.

In summary, you can use either the SUM IF ISERROR or COUNTIF formula to efficiently count errors within your Excel data. Both methods offer a straightforward way to identify and address errors, enhancing your data management process.

Conditional Formatting for Error Identification

Excel provides also a visual way to spot errors in your data using conditional formatting. Here’s how you can set it up:

  • In the “Styles” group, click on “Conditional Formatting.”
  • Choose “New Rule.”
  • In the “New Formatting Rule” dialog box, select “Use a formula to determine which cells to format.”
  • Enter the following formula to detect errors, such as #N/A: =ISERROR(A1) (replace A1 with the first cell in your selected range)
  • Click the “Format” button to choose a formatting style for error cells.
  • After formatting, click “OK” to apply the conditional formatting rule.
See also  Adding average to the pivot table

Now, any cell in the selected range that contains an error will be visually highlighted, making it easy to locate and correct errors within your data. This visual aid can be particularly helpful when dealing with large datasets with occasional errors.