SUMIF and SUMIFS are both Excel functions that sum values based on criteria, but SUMIFS can handle multiple conditions while SUMIF only handles one.
Background
Excel introduced SUMIF in the 1990s as a way to add numbers that meet a single criterion. SUMIFS appeared later, in Excel 2007, extending the concept to support two or more criteria without needing array formulas or helper columns. Both functions belong to the family of conditional aggregation functions, alongside COUNTIF, COUNTIFS, and AVERAGEIF.
How SUMIF Works
The syntax is SUMIF(range, criteria, [sum_range]). The range is the cells checked against criteria. If sum_range is omitted, Excel sums the cells in range that meet the condition.
- Example 1:
=SUMIF(A2:A10,">=50",B2:B10)adds values in B2:B10 where the corresponding A cell is 50 or greater. - Example 2:
=SUMIF(C2:C20,"Apples")totals the numbers in C2:C20 that are exactly "Apples".
SUMIF treats text criteria literally and supports wildcard characters (* and ?) for pattern matching. Numerical criteria can use operators (<, <=, >, >=, <>, =) directly in the criteria string.
How SUMIFS Works
The syntax expands to SUMIFS(sum_range, criteria_range1, criteria1, [criteria_range2, criteria2], …). The first argument is the range to sum; subsequent pairs define each criterion.
- Example 1:
=SUMIFS(B2:B10, A2:A10, ">=50", C2:C10, "Red")adds B cells where A is at least 50 and C equals "Red". - Example 2:
=SUMIFS(D2:D100, B2:B100, "<>", C2:C100, "<5")sums D where B is not blank and C is less than 5.
Unlike SUMIF, SUMIFS always requires a sum_range and can handle any number of criteria. All criteria ranges must be the same size as the sum_range, otherwise Excel returns a #VALUE! error.
Choosing Between Them
Use SUMIF when:
- You need a single criterion.
- Performance matters on very large data sets, as SUMIF is slightly faster due to simpler logic.
- You prefer a shorter formula for readability.
Use SUMIFS when:
- Multiple criteria are required.
- You need to combine logical operators across different columns.
- Criteria ranges are large and you want to avoid array formulas.
In many cases, SUMIFS can replace SUMIF with an additional dummy criterion that always evaluates true, but the extra overhead may not be worth it for simple one‑condition sums.
Common Problems & Troubleshooting
- Size mismatch: All criteria ranges and the sum_range must be the same dimensions; otherwise, #VALUE! appears.
- Text vs. numbers: Criteria that look numeric but are stored as text cause mismatches. Use
--(A2:A10)orVALUE()to coerce types. - Wildcards with numbers: Wildcards work only with text. For numeric patterns, use
SUMPRODUCTor helper columns. - Date criteria: Dates must be in the same format and stored as serial numbers. Use
DATE(year,month,day)inside the criteria string. - Hidden characters: Leading/trailing spaces can break matches. Clean data with
TRIM()orCLEAN().
Comparison Table
| Feature | SUMIF | SUMIFS |
|---|---|---|
| Number of Criteria | 1 | 1 or more |
| Requires sum_range | Optional (defaults to range) | Required |
| Performance | Fast on large sets | slightly slower with many criteria |
| Error on size mismatch | NA | #VALUE! |
| Supported operators | Yes (>, <, =, <>, etc.) | Yes |
| Wildcards | Yes | Yes |
| Text/Number flexibility | Limited | Better with helper columns |
Alternatives & Extensions
When SUMIF or SUMIFS are insufficient, consider:
- SUMPRODUCT – allows complex logical expressions and array calculations without helper columns.
- FILTER & SUM (Excel 365) –
=SUM(FILTER(B2:B10, (A2:A10>=50)*(C2:C10="Red")))achieves the same as SUMIFS but with dynamic arrays. - Pivot Tables – quick aggregation with multiple filters without writing formulas.
- Power Query – for large data sets, perform grouping and summing in the query editor.
Frequently Asked Questions
Can SUMIF handle multiple criteria?
No. SUMIF only accepts a single criterion. For multiple conditions, use SUMIFS or a combination of SUMPRODUCT and logical operators.
Why does my SUMIFS return #VALUE!?
Check that all criteria ranges and the sum_range have identical dimensions. Even a single mismatched cell or a different row count triggers this error.
Is there a performance difference between SUMIF and SUMIFS?
Yes. SUMIF is marginally faster on very large data sets because it processes only one condition. SUMIFS adds overhead for each additional criterion, but the difference is usually negligible unless millions of rows are involved.
How do I sum values that meet a date range?
Use the DATE function inside the criteria: =SUMIFS(B2:B10, A2:A10, ">=" & DATE(2024,1,1), A2:A10, "<=" & DATE(2024,12,31)). Ensure the date cells are stored as dates, not text.
Can I use SUMIFS with text that contains spaces?
Yes, but leading or trailing spaces can cause mismatches. Clean the data with TRIM() or use SUMIFS(..., "*text*", ...) with wildcards.