Count cells with errors
=SUMPRODUCT(--ISERROR(D2:D9))Excel · result on the sample sheet: 3
Describe what you need and get a working ISERROR formula for Excel and Google Sheets, tested on real data before you copy it. ISERROR returns TRUE for any error value, such as #N/A, #VALUE!, #REF!, #DIV/0! or #NAME?.
Each formula below was calculated on its own sample sheet. Open one to see the sheet, why it works, and to try it yourself.
=SUMPRODUCT(--ISERROR(D2:D9))Excel · result on the sample sheet: 3
=IF(ISERROR(D2),"Fix row","OK")Excel · result on the sample sheet: 6 rows (E2:E7)
=SUMIF(A2:A9,"<>*"&E1&"*",B2:B9)Excel · result on the sample sheet: $291.85
=REGEXTEST(A2,"^[^@\s]+@[^@\s]+\.[A-Za-z]{2,}$")Excel · result on the sample sheet: 7 rows (B2:B8)
You describe the task in plain English, and it writes the formula, using ISERROR where that's the right tool, for your table or a sample one. The formula is run in our engine in Excel and Google Sheets mode before you see it, so you get its result, not just a guess.
ISERROR returns TRUE for any error value, such as #N/A, #VALUE!, #REF!, #DIV/0! or #NAME?.
Yes. Each example below opens a page where you try the formula in a live grid and it's checked as you go, and the ISERROR function page has a practice exercise.