SUMIF in Excel adds values in a range that meet one condition you set. The syntax is =SUMIF(range, criteria, sum_range). A classic excel sumif example: on a sales sheet, type =SUMIF(A2:A100,”North”,C2:C100) to total only North-region sales. SUMIFS extends this to two or more conditions at once.
- SUMIF handles one condition; SUMIFS handles two or more conditions simultaneously.
- The syntax is =SUMIF(range, criteria, sum_range) for a single condition.
- You can match text, numbers, dates and wildcards like * and ? inside criteria.
- A SUMIF returning 0 almost always means a data-type mismatch or an extra space in your criteria.
- SUMIFS uses the same logic but pairs each criteria_range with its own criteria argument.
How SUMIF Works
The SUMIF function scans a criteria_range, finds every cell that matches your condition, then adds the corresponding cells from your sum_range. Those two ranges must be the same size, or Excel will return an error or wrong total. Understanding this excel sumif example logic is the foundation of every conditional sum formula you will write.
Excel SUMIF Syntax Breakdown
| Argument | What It Means | Example Value |
|---|---|---|
| range | The column Excel checks against your criterion | A2:A100 (Region column) |
| criteria | The condition to match, text in quotes or a cell reference | “North” or D1 |
| sum_range | The column whose values get added when the condition is true | C2:C100 (Sales column) |
When the criteria_range and sum_range are the same column, you can omit sum_range entirely. That is handy when you want to sum numbers greater than a threshold, like =SUMIF(C2:C100,”>50000″). This single-argument excel sumif example is common in finance teams filtering high-value transactions.
Wildcards and Operators in SUMIF
Criteria can include comparison operators and wildcards. Use “>”, “<“, “>=” or “<=” before a number inside quotes. Use * to match any sequence of characters, so “*Delhi*” catches “New Delhi”, “Delhi NCR” and plain “Delhi” in one go. The ? wildcard matches exactly one character, which is useful when codes follow a fixed pattern like “MH-01” through “MH-99”.
One thing that trips up beginners on the job: if your criteria is in a cell, say D1, do not wrap it in quotes. Just write =SUMIF(A2:A100,D1,C2:C100). Quoting a cell reference makes Excel treat it as literal text, and you will get 0 every time.
Excel SUMIF Examples with Text, Numbers and Wildcards
Here is a realistic excel sumif example dataset you would see in any MIS or analyst role. Imagine a monthly sales report for a consumer goods company with columns: Region (A), Month (B), Product (C) and Sales (INR) (D). Your manager wants region-wise and product-wise totals, a task that comes up daily in Indian FMCG, e-commerce and banking teams.
Example 1: Excel SUMIF Example for Total Sales by Region
=SUMIF(A2:A200,”North”,D2:D200)
Excel reads column A, finds every row where the text is exactly “North”, then adds the matching values in column D. Change “North” to a cell reference pointing to a dropdown and you have built a dynamic report in seconds. This is the most-searched excel sumif example for a reason: it mirrors real reporting needs across every industry.
Example 2: Conditional Sum for Sales Above a Threshold
=SUMIF(D2:D200,”>=100000″)
Here the criteria_range and sum_range are the same column, so the third argument is skipped. This excel sum if criteria pattern is common in finance teams that need to isolate high-value transactions. In Indian GST invoice sheets, for instance, analysts use this to flag invoices above the e-invoicing threshold of Rs 5 crore.
Example 3: Wildcard SUMIF for Inconsistent Product Names
=SUMIF(C2:C200,”*Shampoo*”,D2:D200)
This catches “Herbal Shampoo”, “Anti-Dandruff Shampoo” and “Shampoo 500ml” without you needing to list each variant. On real datasets with inconsistent naming, this excel sumif example alone saves hours of cleaning work. It is one of the most practical conditional sum in Excel techniques for anyone working with product catalogues or SKU lists.
Excel skills like these are consistently listed among the highest paying tech skills that employers look for in analytical roles, and for good reason: clean, conditional summaries are the backbone of almost every business report.
SUMIFS for Multiple Conditions
SUMIFS lets you filter on two or more conditions at once. The syntax shifts slightly: the sum_range comes first, then you add criteria_range and criteria pairs as many times as you need.
=SUMIFS(sum_range, criteria_range1, criteria1, criteria_range2, criteria2, …)
SUMIFS Function in Excel Example: Region and Month Filter
=SUMIFS(D2:D200,A2:A200,”North”,B2:B200,”March”)
This is the sumifs function in excel example most report builders use first. You are applying two filters simultaneously: region equals “North” AND month equals “March”. A single SUMIF cannot do this in one formula; you would need a helper column or an array trick instead. Knowing how to use SUMIF in Excel with multiple criteria via SUMIFS is what separates a basic Excel user from a confident analyst.
SUMIFS with Date Criteria
Dates in Excel are stored as serial numbers, so comparison operators work perfectly. To sum sales from 1 January 2024 to 31 March 2024:
=SUMIFS(D2:D200,E2:E200,”>=”&DATE(2024,1,1),E2:E200,”<=”&DATE(2024,3,31))
The DATE() function builds the serial number reliably regardless of your system’s date format. Hardcoding dates as text strings like “01/01/2024” is a common mistake that causes the excel formula for conditional addition to return 0 when the regional date format does not match.
SUMIF vs SUMIFS: Quick Comparison
| Feature | SUMIF | SUMIFS |
|---|---|---|
| Number of conditions | 1 | Up to 127 |
| Syntax order | range, criteria, sum_range | sum_range, range1, criteria1, … |
| Available since | Excel 2003 | Excel 2007 |
| Works in Google Sheets | Yes | Yes |
| Handles date ranges | Partial (one boundary) | Yes (two boundaries easily) |
When your logic gets complex, say three or four conditions across different columns, some analysts switch to SUMPRODUCT instead. SUMPRODUCT multiplies arrays element by element and sums the result, giving you more flexibility with no SUMIFS argument limit. It is slower on huge datasets, but on a 50,000-row sales file it is rarely noticeable.
If you are building the kind of multi-condition reports described in each excel sumif example above, you are already thinking like a data analyst. Check out these data analytics projects to practise these skills on real datasets.
According to NASSCOM’s 2023 Tech Talent Report, India needs over 1.1 million data professionals by 2026, and spreadsheet-level data manipulation is listed as a baseline requirement for entry-level analyst roles. Microsoft’s own usage telemetry, cited in their 2022 Work Trend Index, shows SUMIF and SUMIFS rank among the top 10 most-used Excel functions globally. LinkedIn’s Jobs on the Rise 2024 report places data analyst roles in the top five fastest-growing positions in India.
When to Use SUMPRODUCT Instead of SUMIF
SUMPRODUCT does not need quotes around operators in the same way, and it handles OR logic more cleanly. If you want sales where region is “North” OR “South”, SUMIFS cannot do that in one formula. SUMPRODUCT can: =SUMPRODUCT(((A2:A200=”North”)+(A2:A200=”South”)>0)*D2:D200). It is worth knowing, even if the standard excel sumif example covers 90% of your day-to-day needs.
If you are moving beyond Excel into Python for larger datasets, the Pandas and NumPy guide on 3.0 University shows you how groupby and conditional filtering replicate everything SUMIF does, at scale.
Troubleshooting SUMIF: Why Your Excel SUMIF Example Returns 0
A SUMIF that returns 0 when you expect a real number is almost always one of five problems. Knowing which one to check first saves serious time on any excel sum with criteria formula.
Five Reasons SUMIF Returns 0
- Numbers stored as text. If your sales column shows numbers but they are left-aligned, Excel treats them as text and will not sum them. Select the column, go to Data, Text to Columns, Finish. That forces Excel to re-evaluate the data type.
- Extra spaces in criteria cells. “North ” (with a trailing space) will not match “North”. Use TRIM() on your lookup values or on the criteria_range itself inside the formula.
- Mismatched date formats. Typing a date as text in the criteria when the date column holds serial numbers causes a mismatch. Always use the DATE() function or a cell reference that holds a real date value.
- Wrong range sizes. If criteria_range is A2:A100 but sum_range is D2:D99, Excel silently misaligns the rows. Always make ranges the same length.
- Case-sensitive text. SUMIF is not case-sensitive, so “north”, “North” and “NORTH” all match. But if you are using a formula that wraps SUMIF with EXACT(), that introduces case sensitivity and may exclude rows you expect to include.
A practical tip from real analyst work: always test your excel sumif example against a manual filter first. Apply an AutoFilter for the same condition, look at the status bar total at the bottom of the screen, and compare it to your formula output. If they differ, the data itself is the culprit, not the formula logic.
Knowing how to add values in Excel based on condition is one skill, but understanding why the formula fails teaches you to think critically about data quality, which is exactly the mindset that sets strong analysts apart. If you are preparing for interviews, the data analyst interview questions guide covers the Excel questions hiring managers actually ask.
For anyone wondering whether to pursue a pure analyst path or go deeper into science, the data analyst vs data scientist breakdown explains the practical difference in skills, salaries and career trajectories in the Indian market.
If you are just starting out and want to understand the full career path, the data analyst kaise bane guide walks through the exact steps from beginner to job-ready in Hindi-English, covering tools like Excel, SQL and Python in sequence.
Frequently Asked Questions
What is an excel sumif example for beginners?
The simplest excel sumif example is =SUMIF(A2:A100,”South”,C2:C100), which totals all values in column C where column A contains the word “South”. Replace “South” with any text, number or cell reference to adapt it to your data. This single formula covers the majority of conditional sum tasks in everyday reporting.
How do I use SUMIF in Excel?
Type =SUMIF(range, criteria, sum_range) in any empty cell. Replace range with the column you want to check, criteria with the condition in quotes or a cell reference, and sum_range with the column to add up. For example, =SUMIF(A2:A100,”South”,C2:C100) totals all sales in column C where column A says “South”.
What is the difference between SUMIF and SUMIFS?
SUMIF applies one condition; SUMIFS applies two or more. The argument order also changes: SUMIF puts sum_range last, while SUMIFS puts it first. If you only ever have a single condition, SUMIF is slightly simpler to write. For anything more complex, use SUMIFS from the start.
How do I add values based on a condition in Excel?
Use SUMIF for a single condition or SUMIFS for multiple conditions. Both functions scan a criteria_range for matches and add the corresponding values from a sum_range. For non-standard logic like OR conditions across multiple columns, SUMPRODUCT gives you more control without nesting multiple SUMIF formulas.
Can SUMIF use dates as criteria?
Yes. Wrap the date in the DATE() function to avoid format mismatches: =SUMIF(B2:B200,”>=”&DATE(2024,4,1),D2:D200) sums all values from 1 April 2024 onwards. Avoid typing dates as text strings inside the criteria argument, because the result depends on your system’s regional settings and will often return 0 on other machines.
Why does my excel sumif example return 0?
The most common causes are numbers stored as text in the sum_range, trailing spaces in the criteria or criteria_range cells, and date format mismatches. Check the alignment of your numbers first: left-aligned numbers are almost always stored as text. Use TRIM() to remove hidden spaces, and always use DATE() for date criteria instead of typed text.
You now have everything you need to build conditional totals in Excel, from a single-region filter to a multi-month, multi-product report. Here are three things to do this week to make it stick:
- Open any sales or expense sheet you have access to and write one excel sumif example for a text condition and one for a number threshold. Compare both outputs to a manual AutoFilter total.
- Convert your best SUMIF into a SUMIFS by adding a date range as a second condition. This single step turns a static formula into a dynamic monthly report.
- Explore the data analytics project ideas on 3.0 University to find a dataset where you can apply both functions on real-world data and build something portfolio-worthy.
The same conditional thinking you just practised in Excel transfers directly into security analytics work, where analysts filter event logs, sum alert counts by severity, and build detection dashboards every day. If that kind of applied data work interests you, take a look at the EC-Council Certified SOC Analyst course at 3.0 University, and browse the full catalogue of online certification courses in Cybersecurity, AI, Ethical Hacking, Blockchain and Web3 to see where your data skills can take you next.
Last updated: October 2026. Reviewed by the 3University editorial team.