How to Use SUMIFS with Multiple Not-Equal Criteria to Exclude Text
Question details
The user needs to calculate a sum using multiple criteria while excluding specific text values that contain leading zeros (such as '00000' and '05757'), ensuring the zeros are not lost during the matching process.

- Product
- Spreadsheet
- Device & OS
- not provided
- Scenario
- Filtering a dataset with a sum formula to exclude several specific string identifiers that resemble numbers but are formatted as text with leading zeros.
- Observed behavior
- The goal is to properly chain multiple '<>' (not equal to) conditions in a SUMIFS formula without the spreadsheet engine auto-converting the text strings into standard numerical values, which causes evaluation errors.
Ensure the columns containing your reference data (especially items with leading zeros) are formatted as Text so that the spreadsheet does not automatically drop the zeros before applying the formula.
Apply SUMIFS with Chained Not-Equal Criteria
Use the SUMIFS function and chain multiple '<>' criteria operators to safely exclude specific text strings from your calculation.
The SUMIFS function can handle up to 127 criteria pairs. By referencing the same criteria range multiple times with different '<>' parameters, you can exclude several specific values within a single formula.
Click on the blank cell where you want the final calculation to be displayed.
Type `=SUMIFS(SumRange, CriteriaRange1, Criteria1)` to establish your initial inclusions.
Append your exclusion criteria to the formula by referencing the target column and using the not-equal operator in quotes. For example: `, CriteriaRange2, "<>00000", CriteriaRange2, "<>05757"`.
Close the parenthesis and press Enter. The complete formula should look similar to: `=SUMIFS(E:E, B:B, 24, C:C, "<>00000", C:C, "<>05757")`. The engine will sum column E where column B is 24, excluding rows in C that match '00000' or '05757'.

Use SUMPRODUCT for Strict Text Comparison
If standard SUMIFS unexpectedly converts your leading-zero text into pure numbers during evaluation, SUMPRODUCT serves as a more reliable alternative for exact text matching.
Handle Advanced Calculations Seamlessly with WPS Spreadsheet
WPS Spreadsheet provides robust, enterprise-level support for logical and mathematical functions including SUMIFS, SUMPRODUCT, and COUNTIFS. It efficiently handles advanced text formats, leading zeros, and massive datasets with ease.
- 1. Download and Install: Download WPS Office Free and install it on your device.
- 2. Open your Dataset: Launch WPS Spreadsheet and open your document containing the data.
- 3. Apply Formulas: Navigate to the Formulas tab or type your SUMIFS formula directly into a cell for instant, accurate results.

Frequently Asked Questions
Why does my spreadsheet drop leading zeros when calculating formulas?
Spreadsheets automatically strip leading zeros from data they interpret as standard numbers. To prevent this, ensure the source cells are formatted as 'Text' and enclose your formula criteria in quotation marks, such as "<>00000".
Can I use multiple not-equal criteria on the same column in a SUMIFS formula?
Yes. SUMIFS handles multiple conditions by treating them as an 'AND' logic sequence. You just need to repeat the criteria range followed by the specific not-equal parameter for each value you wish to exclude.
What is the difference between SUMIFS and SUMPRODUCT for this task?
SUMIFS is designed specifically for conditional summation and generally calculates faster on simple criteria. SUMPRODUCT is an array function that performs strict mathematical evaluations, making it highly reliable when dealing with rigid text comparisons or complex, multi-layered conditions.
What does the '<>' operator mean in spreadsheet formulas?
The '<>' operator is a logical comparison symbol that means 'not equal to'. When used in formulas like SUMIFS, it commands the function to filter out or ignore any cells that precisely match the specified criteria.




