The best way to solve this problem is to use the SUMPRODUCT function together with the ISERROR function.
you could also use the COUNTIF function or COUNTIFS function to exclude specific errors.
Both approaches are explained below.
Notice both values are enclosed in double quotes.
However, this approach is tedious if the goal is to exclude all types of errors from the count.
In that case, the SUMPRODUCT option below is more straightforward.
SUMPRODUCT function
The SUMPRODUCT function works directly with arrays and ranges.
This array is now in the correct form.
The difference is that ISERR ignores #N/A errors.
When given TRUE, NOT returns FALSE.
When given FALSE, NOT returns TRUE.
Use the NOT function to reverse a logical value.
SUMPRODUCT Function
The Excel SUMPRODUCT function multipliesrangesorarraystogether and returns the sum of products.
COUNTIF can be used to count…