How to Exclude #N/A Errors from SUMIFS Calculation in Excel
Question details
The user wants to use the SUMIFS function to sum values in column CA, but needs to strictly exclude rows where column BB contains an #N/A error.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Calculating conditional sums across multiple columns where one of the criteria columns generates #N/A formula errors.
- Observed behavior
- The SUMIFS calculation either returns an error or fails to calculate correctly because the criteria range contains unhandled #N/A errors.
Before modifying your formulas, check if the #N/A error in the source column is expected (such as a missing lookup value) or an indicator of a data issue that should be resolved first.
Wrap the Source Formula with IFERROR
The most reliable method is to handle the error directly at its source by wrapping the formula generating the #N/A error with an IFERROR function.
By replacing the #N/A error with a zero or a blank string before the SUMIFS calculation takes place, you ensure that the criteria range contains only clean data. This prevents SUMIFS from failing.
Click on the first cell in column BB that contains the formula currently generating the #N/A error.
Click into the formula bar and wrap your existing formula with IFERROR. For example, change it to: =IFERROR(your_formula, "") or =IFERROR(your_formula, 0).
Press Enter to save the formula, then click and drag the fill handle (the small square at the bottom-right of the cell) down to apply this updated formula to the rest of the column.
Write your SUMIFS formula normally pointing to column CA for the sum range and column BB for criteria. The #N/A errors will now be ignored based on your specified replacement value.

Create a Helper Column to Filter Out Errors
If you are unable to edit the original formula in column BB, you can create an adjacent helper column to sanitize the data.
Handle Complex Formulas Effortlessly with WPS Spreadsheet
WPS Spreadsheet provides a robust, fast, and highly intuitive environment for managing complex datasets, handling formula errors, and executing advanced SUMIFS functions seamlessly.
- 1. Install WPS Office: Download and install WPS Office Free on your device.
- 2. Open your workbook: Launch WPS Spreadsheet and open your existing data file.
- 3. Clean your data: Easily apply the IFERROR function to your target columns to remove #N/A errors.
- 4. Calculate the sum: Use the SUMIFS function to quickly and accurately calculate your error-free dataset.

Frequently Asked Questions
Why does an #N/A error occur in my spreadsheet?
The #N/A error typically stands for 'Value Not Available.' It most commonly happens when lookup functions (such as VLOOKUP, XLOOKUP, or MATCH) cannot find a corresponding match in your source data.
Can I make SUMIFS directly ignore errors without changing the source data?
No, SUMIFS struggles if the sum range or criteria ranges contain errors, and will often return an error itself. It is best practice to sanitize the data first using IFERROR or to use an alternative function like AGGREGATE.
Should I replace errors with a zero or a blank text string?
It depends on your workflow. Replacing errors with a zero is generally safer for mathematical operations. However, replacing them with a blank string ("") often looks cleaner visually and prevents zeros from skewing average calculations.




