Quickly audit a sheet by counting how many cells contain errors. SUMPRODUCT over ISERROR tallies every #N/A, #DIV/0!, and #VALUE! in one formula — no helper column.
The example
Three of these cells are broken.
| A | B | |
|---|---|---|
| 1 | Value | Errors |
| 2 | #N/A | 3 |
| 3 | #DIV/0! |
The formula
The formula:
How it works
How it works:
ISERROR(range)returns a TRUE/FALSE array marking every error cell.- The double unary
--coerces TRUE/FALSE to 1/0. SUMPRODUCTadds the 1s — the total number of errors.- In Excel 365 you can also use
=SUM(--ISERROR(range))entered normally, since arrays spill automatically.
Count a specific error type: =SUMPRODUCT(--(ERROR.TYPE(range)=7)) counts only #N/A (error code 7), and --ISNA(range) does the same more simply. ISERROR catches all errors; ISERR catches all except #N/A.
Try it: interactive demo
Cells (type words; "err" marks an error).
Variations
Count #N/A only
Missing-lookup count:
Any error? (yes/no)
Flag the column:
365 spill
Plain SUM:
Pitfalls & errors
ISERROR vs ISERR. ISERROR counts #N/A too; ISERR skips it — pick based on whether #N/A counts.
The -- is required. Without coercion, SUMPRODUCT adds TRUE/FALSE as text and returns 0.
Whole-column ranges are slow. Limit the range to the data for big sheets.
Practice workbook
Frequently asked questions
How do I count error cells in a range in Excel?
How do I count only #N/A errors?
What's the difference between ISERROR and ISERR?
Stop fighting formulas. Learn them in a day.
This recipe is one of hundreds of real-world formulas we teach. Our Excel Formulas & Functions class covers lookups, logic, text, and dynamic arrays hands-on — live in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.
See the Formulas & Functions Class