SUMIF Function in Excel: Syntax, Examples, and Common Uses
Learn how to use the SUMIF function in Excel with syntax, examples, and tips. Covers criteria, wildcards, dates, and SUMIFS for multiple conditions.

SUMIF Function in Excel: What It Does
The SUMIF function in Excel sums values in a range that meet a single condition you specify. Instead of adding up every number in a column, SUMIF adds only the numbers where a corresponding cell in a related column matches your criteria. For example: sum all sales amounts where the region is 'East,' or sum all expenses where the category is 'Marketing,' or sum all invoice totals where the amount is greater than 1,000.
SUMIF's syntax is: =SUMIF(range, criteria, [sum_range]). The first argument (range) is the column you're checking for the condition. The second argument (criteria) is what you're looking for — a value, text string, number, or comparison. The third argument (sum_range) is the column containing the numbers to add up — if you omit it, Excel sums the range itself. Getting these three arguments in the right order and understanding what each does is the key to using SUMIF correctly.
SUMIF is one of the most frequently used Excel formulas in business — appearing constantly in financial models, sales reports, budget trackers, and data analysis workbooks. Anyone who builds spreadsheets with categorized data will use SUMIF regularly, and understanding it fully (including its edge cases and limitations) saves significant time compared to manually filtering and summing data.
For situations requiring multiple conditions — sum sales where region is 'East' AND product is 'Widget A' — you need SUMIFS (the plural form), which extends SUMIF to handle up to 127 criteria pairs. SUMIF handles exactly one condition; SUMIFS handles one or more. Many Excel users start with SUMIF and graduate to SUMIFS as their formulas get more complex. The Excel formulas guide covers SUMIF alongside COUNTIF, AVERAGEIF, and other conditional functions in the broader context of Excel's formula set.
Most Excel users first encounter SUMIF when they need something a simple SUM cannot do — add up only the rows matching a specific condition. Once mastered, it becomes indispensable for any categorized dataset. SUMIF replaces the manual workflow of filtering a column, selecting visible cells, and reading the status bar total — a workflow that breaks the moment data changes or a new person opens the file.
Because SUMIF is dynamic, add new transaction rows to your source data and every formula referencing that range updates automatically on the next recalculation, making it a core tool for any spreadsheet that gets updated regularly rather than used once and then archived.
- Syntax:
=SUMIF(range, criteria, [sum_range]) - range: The column or range you're checking for the condition
- criteria: What you're looking for — text, number, expression (>100), or cell reference
- sum_range: Optional — the column to sum. If omitted, Excel sums the range itself
- For multiple criteria: Use SUMIFS instead:
=SUMIFS(sum_range, criteria_range1, criteria1, criteria_range2, criteria2, ...) - Wildcards work: Use * for any characters, ? for one character in text criteria
- Case-insensitive: SUMIF treats uppercase and lowercase as the same
- Works with dates: Can sum by date range, month, or year with appropriate criteria
SUMIF Examples: Step-by-Step
Sum by Exact Text Match
Sum Using Comparison Operators
Sum with Wildcards
Sum by Date Criteria
SUMIFS for Multiple Conditions

SUMIF Syntax Explained: Each Argument in Detail
The range argument in SUMIF is the column (or range) where Excel applies your condition. This doesn't have to be the same column containing the values you want to sum — in fact, the most common use of SUMIF has the range and sum_range as separate columns. For example, if column A has product categories and column B has sales figures, your range is column A (where you're looking for a category name) and your sum_range is column B (the numbers to add up).
The criteria argument accepts several formats. A text string must be in quotes: "East", "Marketing", "Yes". A number can be entered directly or as a cell reference: 100, C1. A comparison expression must be in quotes: ">100", "<="&C1, "<>" (not equal to blank). A wildcard pattern uses * and ?: "*North*", "S?les". A blank criteria string "" matches empty cells, and "<>" matches non-empty cells. Mixing types incorrectly is one of the most common SUMIF errors — comparison operators like > and < must always be inside quotes as text strings.
The sum_range argument is optional. If you omit it, Excel sums the range itself using the same condition — useful when you're directly testing and summing the same column (sum all values in column B that are greater than 500: =SUMIF(B:B,">500")). When sum_range is a different size than range, Excel adjusts it — but for clarity and reliability, always use the same-sized range and sum_range. Mismatched sizes can produce unexpected results especially with non-column ranges.
A common confusion: SUMIF and SUMIFS have reversed argument orders for sum_range. In SUMIF, sum_range is the third (optional) argument. In SUMIFS, sum_range is the first required argument. This reversal trips up experienced users when switching between the two functions. If your SUMIFS formula produces an error, check whether you put sum_range first — a SUMIF habit that causes SUMIFS to fail. For a broader comparison of when to use each conditional function, the conditional formatting guide covers how Excel's conditional logic applies across formulas and display rules.
SUMIF vs Related Functions
One condition: sum values where one criterion is met. Syntax: =SUMIF(range, criteria, sum_range). Simplest conditional sum — use this when you have exactly one condition to test.
Multiple conditions: sum values where ALL criteria are met simultaneously. Syntax: =SUMIFS(sum_range, range1, criteria1, range2, criteria2, ...). Note sum_range comes FIRST, unlike SUMIF.
Count (not sum) cells meeting one or multiple criteria. Same logic as SUMIF/SUMIFS but returns the count of matching cells rather than their sum. Use when you want to know how many rows match, not their total.
Calculate the average (not sum) of values meeting one or multiple criteria. Useful for 'what is the average sale amount for the East region' vs SUMIF's total. Same syntax pattern as SUMIF/SUMIFS.
SUMIF Common Use Cases
Budget trackers are one of the most common SUMIF applications. If column A contains expense categories (Rent, Utilities, Marketing, Payroll) and column B contains amounts, you can use SUMIF to pull the total for each category onto a summary sheet: =SUMIF(Sheet1!A:A, "Marketing", Sheet1!B:B). Reference another sheet by prefixing the range with the sheet name and an exclamation point.
For a complete budget summary table, place your category names in one column and SUMIF formulas in the adjacent column referencing the category name: =SUMIF(Sheet1!A:A, A2, Sheet1!B:B) where A2 contains the category name. This pattern creates a dynamic summary that updates automatically when you add new transactions to the data sheet — the foundation of most Excel budget models. See the Excel budget template guide for complete budget structure examples.

SUMIF Errors, Limitations, and Troubleshooting
The most common SUMIF error is getting 0 or an incorrect sum when you expect a number. Usually this means the criteria doesn't match the data exactly. Check for leading or trailing spaces in your data — 'East' and 'East ' look identical but Excel treats them as different strings. Use TRIM() to clean your data before applying SUMIF if you suspect spacing issues. Also check whether your numbers are stored as text rather than actual numeric values — numbers stored as text look like numbers but won't sum. Convert them with VALUE() or by multiplying by 1.
SUMIF is case-insensitive, which is usually convenient — 'east', 'East', and 'EAST' all match the same criteria. But if your data has inconsistent capitalization and you need case-sensitive matching (not standard SUMIF behavior), you'd need an array formula approach or a helper column to normalize case first. For most business data, case-insensitivity is what you want, so this isn't typically a limitation.
SUMIF can't handle OR logic directly — it doesn't let you sum rows where the category is 'Marketing' OR 'Sales' in a single formula. The workaround is either two separate SUMIF formulas added together (=SUMIF(A:A,"Marketing",B:B)+SUMIF(A:A,"Sales",B:B)) or SUMPRODUCT with an OR condition. For straightforward OR logic with two or three options, the added SUMIF approach is cleaner and more readable.
Performance can be an issue with very large datasets. Using whole-column references like A:A instead of specific ranges like A2:A10000 means Excel calculates more cells than necessary. For workbooks with many SUMIF formulas across large datasets, specifying exact ranges instead of whole columns can meaningfully improve calculation speed. Also consider using Excel Tables — referencing table columns (Table1[Category]) rather than letter references (A:A) makes formulas easier to read and automatically adjusts when the table grows, without recalculating the entire column. For keyboard shortcuts that speed up formula writing, check the Excel shortcuts guide.
One important reliability consideration: when your range and sum_range are different sizes, SUMIF can return unexpected results. If range is A2:A500 but sum_range is B2:B200, Excel only examines rows where both ranges overlap. Using whole-column references (A:A and B:B) avoids this entirely since they always match. Using Excel Table structured references — Table1[Category] and Table1[Amount] — is even better: they automatically expand when new rows are added to the table, eliminating both the size-mismatch problem and the need to manually extend ranges as data grows. Structured references also make formulas self-documenting since the column name appears directly in the formula.
SUMIF Best Practices Checklist
SUMIF vs SUMIFS: When to Use Each
- +SUMIF is simpler to write and read for single-condition sums — fewer arguments, cleaner formula
- +SUMIFS handles all scenarios SUMIF can, plus multiple conditions — if in doubt, SUMIFS always works
- +SUMIF's omittable sum_range argument makes it slightly more concise when testing and summing the same column
- +SUMIFS allows adding more conditions later without restructuring the formula from scratch
- +Both functions are fast and efficient for standard datasets — no significant performance difference for typical use
- −SUMIF can't handle multiple conditions — you'd need to nest or add SUMIF formulas for OR/AND logic across multiple columns
- −SUMIFS has reversed argument order compared to SUMIF — forgetting this causes errors when switching between them
- −Neither SUMIF nor SUMIFS supports OR logic natively within a single formula — use SUMPRODUCT for complex OR conditions
- −Wildcards (* and ?) only work with text criteria — they don't apply to numeric comparisons in SUMIF
- −SUMIF can't sum based on cell color, font, or formatting — those use cases require VBA or Power Query

Advanced SUMIF Techniques
Partial text matching with wildcards is one of SUMIF's most useful advanced features. To sum all rows where column A starts with 'North': =SUMIF(A:A,"North*",B:B). To sum where the cell contains the word 'Ltd' anywhere in a company name: =SUMIF(A:A,"*Ltd*",B:B). To match a wildcard pattern stored in a cell: =SUMIF(A:A,"*"&D1&"*",B:B) where D1 contains the search term. This last pattern is particularly useful for interactive dashboards where users type a search term and the SUMIF result updates dynamically.
Summing the top or bottom values requires combining SUMIF with other functions. For 'sum all values greater than the average': =SUMIF(B:B,">"&AVERAGE(B:B)). For 'sum all values in the top 10': use SUMPRODUCT with LARGE rather than SUMIF. For 'sum values excluding blanks': =SUMIF(B:B,"<>""",B:B) — note the doubled quotes to represent an empty string as the criteria.
SUMIF across multiple sheets requires a different approach — SUMIF doesn't directly support multi-sheet summing in a single formula. The workaround is a 3D SUM combined with SUMIF, or using Power Query to consolidate data from multiple sheets before applying SUMIF. For simple cases where the same range on multiple identically-structured sheets needs summing by a condition, SUMPRODUCT with INDIRECT is one method, though INDIRECT is volatile (recalculates constantly) and should be used sparingly in large workbooks.
Using named ranges makes SUMIF formulas more readable and maintainable. Instead of =SUMIF(A2:A1000,"East",B2:B1000), define the name 'SalesRegion' for A2:A1000 and 'SalesAmount' for B2:B1000, then write =SUMIF(SalesRegion,"East",SalesAmount). Named ranges also update automatically when the underlying data range changes if you use dynamic named ranges or Excel Tables. For creating drop-down lists that work with SUMIF criteria for interactive dashboards, the Excel drop-down list guide covers how to combine data validation with formulas effectively.
One underused SUMIF pattern is the category summary table: instead of writing one SUMIF formula and manually changing the criteria each time, write your category names in column D and place SUMIF formulas in column E that each reference the adjacent cell as criteria — =SUMIF(A:A, D2, B:B), =SUMIF(A:A, D3, B:B), and so on.
This creates a complete summary breakdown from a single formula pattern. Combined with a structured Excel Table for source data, the summary expands automatically as you add rows — and copying the SUMIF formula down whenever you add a new category to column D is all the maintenance required.
SUMIF Function: Key Facts
SUMIF in Real Workbooks: Practical Patterns
Building a summary dashboard from raw data is the most common real-world application of SUMIF. A typical pattern: raw transaction data lives on Sheet1 with columns for Date, Category, Region, and Amount. Sheet2 is a summary dashboard where SUMIF formulas reference Sheet1 to pull totals by category, region, or time period. This separation between raw data and summary display is a spreadsheet design principle that makes SUMIF formulas more maintainable — when new data arrives, you add it to Sheet1 and the summary automatically updates.
Combining SUMIF with data validation (drop-down lists) creates interactive dashboards. A drop-down in cell D1 lets users choose a region; SUMIF formulas referencing D1 as the criteria update automatically when the selection changes. This is more efficient than pivot tables for simple, fixed summary views where the user needs to filter by one or two variables without reorganizing the entire output layout. For complex multi-dimensional analysis, pivot tables are still the right tool — SUMIF-based dashboards work best for structured summary views with predictable dimensions.
Version control matters when sharing SUMIF-based workbooks with multiple editors. If someone modifies the category names in the raw data (changing 'Marketing' to 'Mktg'), all SUMIF formulas using the old category name will return 0. A data dictionary sheet listing valid category values and a drop-down list enforcing those values in the raw data entry column prevents this problem.
Using structured Excel Tables with data validation on input columns makes the raw data more robust against the typos and inconsistencies that cause SUMIF failures in shared workbooks. For broader spreadsheet organization and navigation tips, the how to use Excel guide covers data entry best practices that complement your SUMIF formulas.
For workbooks shared across teams, documenting SUMIF formula logic helps whoever maintains the file later — even if that person is you, six months from now. Right-click any cell and use Insert Note (or New Comment in newer Excel versions) to briefly explain what the formula does, what column it references as criteria, and where the source data lives. When a formula breaks because someone restructured the source sheet, understanding the original intent — sum all Q1 regional sales from Sheet1, column E — makes the fix a matter of minutes rather than a frustrating investigation through an unfamiliar workbook.
If SUMIF returns 0 when you expect a number, check: (1) Data type mismatch — your criteria is a number but the range contains numbers stored as text (or vice versa). Look for a green triangle in the top-left of cells. (2) Extra spaces — your criteria is 'East' but cells contain 'East ' with a trailing space. Use TRIM() to clean data. (3) Criteria format — comparison operators like > must be inside quotes: ">100" not >100. All three cause SUMIF to return 0 without an error message, making them particularly frustrating to debug without a systematic check.
SUMIF vs Pivot Tables: When to Use Which
SUMIF and pivot tables are both tools for summarizing data by category, and the choice between them depends on how dynamic your analysis needs to be. SUMIF formulas are best when you have a fixed summary structure — specific totals you need in specific cells, feeding into charts or other calculations in a structured layout. Pivot tables are better when you need to explore data freely, drag and drop dimensions, and quickly answer different questions without writing new formulas.
SUMIF formulas update automatically when the underlying data changes (as long as Excel recalculates, which it does automatically by default). Pivot tables require a manual refresh after the source data updates — you click Refresh or set the pivot table to refresh on open. For dashboards shared with non-technical users who might not know to refresh the pivot table, SUMIF-based summaries are often more reliable since they update without any user action.
Performance with very large datasets favors SUMIF over pivot tables in some cases — pivot tables build an in-memory cache that can consume significant RAM with millions of rows, while SUMIF formulas calculate on demand without a separate cache structure. However, for complex multi-dimensional analysis (crosstab views, multiple grouping levels, dynamic filtering across many dimensions), pivot tables are the clearly superior tool.
Knowing when each tool is appropriate — and being comfortable with both — is what separates intermediate Excel users from power users. For exam preparation around these functions, the Excel formulas guide covers SUMIF, SUMIFS, and the full conditional function family in exam-ready format.
Excel Questions and Answers
About the Author
Attorney & Bar Exam Preparation Specialist
Yale Law SchoolJames R. Hargrove is a practicing attorney and legal educator with a Juris Doctor from Yale Law School and an LLM in Constitutional Law. With over a decade of experience coaching bar exam candidates across multiple jurisdictions, he specializes in MBE strategy, state-specific essay preparation, and multistate performance test techniques.