
Adding up numbers is easy — Excel's SUM function handles that in seconds. But what happens when you only want to sum values that meet a specific condition? That's where SUMIF and SUMIFS become indispensable. These two functions let you add up numbers selectively, based on one condition or many, and they're among the most practical formulas you'll use in day-to-day spreadsheet work.
This guide walks you through both functions from the ground up: syntax, real examples, common mistakes, and a practical scenario you can follow along with. Whether you're tracking sales, managing budgets, or analyzing project data, conditional summing will save you enormous amounts of manual effort.
SUMIF sums values in a range only when a corresponding cell in another range meets a condition you define. It's perfect when you have a single criterion — for example, "sum all sales from the East region" or "add up expenses greater than $500."
=SUMIF(range, criteria, [sum_range])
Suppose column A contains product categories and column B contains sales amounts. To sum all sales for "Electronics":
=SUMIF(A2:A100, "Electronics", B2:B100)
To sum all values in column B that are greater than 1000:
=SUMIF(B2:B100, ">1000")
Notice that when the range and sum_range are the same, you can omit the third argument. Also note that comparison operators like >, <, >=, and <> must be enclosed in quotes.
SUMIFS is the multi-condition version of SUMIF. It allows you to specify two or more criteria, and Excel only sums values where all conditions are satisfied simultaneously. The argument structure is slightly different from SUMIF — the sum range comes first.
=SUMIFS(sum_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)
Using the same dataset, to sum sales for "Electronics" in the "East" region (assuming column C contains region names):
=SUMIFS(B2:B100, A2:A100, "Electronics", C2:C100, "East")
This formula checks each row: if column A is "Electronics" AND column C is "East," the corresponding value in column B is included in the total.
Let's build a realistic scenario. Imagine you're managing a sales report with the following columns:
| A: Salesperson | B: Region | C: Product | D: Month | E: Revenue |
|---|---|---|---|---|
| Alice | East | Laptops | January | $4,200 |
| Bob | West | Phones | January | $3,800 |
| Alice | East | Phones | February | $2,900 |
| Carol | East | Laptops | February | $5,100 |
| Bob | West | Laptops | February | $4,400 |
Your data runs from row 2 to row 500. Here are formulas to answer common business questions:
Total revenue for Alice:
=SUMIF(A2:A500, "Alice", E2:E500)
Total revenue in the East region:
=SUMIF(B2:B500, "East", E2:E500)
Total Laptop revenue in the East region:
=SUMIFS(E2:E500, C2:C500, "Laptops", B2:B500, "East")
Total revenue for Alice selling Laptops in January:
=SUMIFS(E2:E500, A2:A500, "Alice", C2:C500, "Laptops", D2:D500, "January")
Notice how each additional condition narrows the result further. This kind of analysis would take minutes to do manually but runs instantly with SUMIFS. If you're building a full reporting tool, this pairs well with the techniques covered in the guide to Sales Dashboard in Excel: Track KPIs and Performance.
Typing criteria directly into the formula works for one-off calculations, but for dashboards and reports, referencing cells makes your formulas dynamic and easy to update.
Place "Alice" in cell H2 and "Laptops" in cell H3. Your formula becomes:
=SUMIFS(E2:E500, A2:A500, H2, C2:C500, H3)
Now change H2 to "Bob" and the formula instantly recalculates for Bob's laptop sales. This approach is essential for interactive dashboards. Understanding Excel cell references — relative vs absolute will help you make sure these references don't shift unexpectedly when you copy formulas.
Both functions support wildcards, which are especially useful when your data isn't perfectly consistent:
"Lap*" matches "Laptops," "Laptop Bag," etc."Bo?" matches "Bob," "Boy," "Bog."~* to match a literal asterisk.Example — sum all revenue for products that start with "Lap":
=SUMIF(C2:C500, "Lap*", E2:E500)
SUMIFS handles dates naturally because Excel stores dates as serial numbers. You can use comparison operators to sum values within a date range.
Assuming column D contains actual date values (not plain text), to sum revenue from January 1 to March 31, 2024:
=SUMIFS(E2:E500, D2:D500, ">="&DATE(2024,1,1), D2:D500, "<="&DATE(2024,3,31))
The & operator concatenates the comparison operator (as text) with the result of the DATE function. This is a very common pattern worth memorizing.
All ranges in SUMIFS must be the same size. If your sum_range has 500 rows but a criteria_range has 499, Excel returns an error. Always double-check that your ranges are consistent.
Writing =SUMIF(B2:B100, >500, B2:B100) will fail. Operators and text criteria must be in quotes: ">500" or "Electronics".
In SUMIF, the sum_range is the third argument. In SUMIFS, it's the first. Mixing these up is a frequent source of wrong answers — double-check your argument order every time.
If a criteria_range column contains numbers stored as text, a numeric criterion won't match them. You may need to clean your data first. The article on Power Query: Import and Transform Data Like a Pro covers how to handle these data quality issues efficiently.
There are other ways to conditionally sum data in Excel, and it's worth knowing when to use each:
For most business reporting tasks, SUMIFS is the right tool: it's fast, readable, and handles the vast majority of conditional summing scenarios. When you're building a complete financial overview, combining SUMIFS with the techniques in Excel Budget Template: Track Personal or Business Finances creates a powerful and flexible reporting system.
SUMIFS becomes even more powerful when nested inside other formulas:
Calculate a percentage of total:
=SUMIFS(E2:E500, B2:B500, "East") / SUM(E2:E500)
Compare two conditional sums:
=SUMIFS(E2:E500, B2:B500, "East") - SUMIFS(E2:E500, B2:B500, "West")
Use with IF to handle empty criteria gracefully:
=IF(H2="", SUM(E2:E500), SUMIFS(E2:E500, A2:A500, H2))
If you want to take your logical formula skills further, the article on the IF Function: Logical Tests and Nested IFs is a natural next step.
If you find yourself staring at a complex SUMIFS with four or five criteria and can't figure out why it's returning zero, try describing what you need in plain English — tools like ExcelGPT can generate the exact formula from a description like "sum revenue where region is East, product is Laptops, and date is in Q1 2024," instantly giving you the right syntax to verify and use.
Not directly. SUMIF is designed for a single condition. If you need two or more conditions, use SUMIFS instead. However, you can work around it by adding multiple SUMIF results together when the criteria apply to the same range and you want an OR condition (e.g., sum rows that are either "East" or "West").
The most common causes are: criteria typed with different capitalization than the data (SUMIFS is case-insensitive, so that's not it), numbers stored as text in either the sum range or criteria range, extra spaces in cell values, or a mismatch in range sizes. Use the TRIM function or data cleaning steps to resolve whitespace issues.
Yes, provided your dates are stored as actual Excel date values (not text). Use comparison operators with the DATE function or direct date references: =SUMIFS(E2:E500, D2:D500, ">="&H1, D2:D500, "<="&H2) where H1 and H2 contain your start and end dates.
Excel allows up to 127 criteria range/criteria pairs in a single SUMIFS formula — far more than you'll ever need in practice. Performance can slow down with very large datasets and many criteria, but for typical business data (tens of thousands of rows), SUMIFS remains fast and reliable.
Learn how Excel's TEXT function converts numbers, dates, and times into formatted text strings using format codes — with real examples and practical use cases.
Learn how the Excel IF function works, how to nest multiple IFs, and when to use modern alternatives like IFS and SWITCH for cleaner, more readable logic.
Master SUMIF and SUMIFS in Excel to sum data based on single or multiple conditions, with real syntax, practical examples, and a step-by-step walkthrough.