The SUMIFS function in Excel is used to add up numbers in a specific range based on one or more conditions (criteria) that must be met. Unlike the standard SUM function, which adds everything in a range, or the SUMIF function, which only allows for one condition, SUMIFS allows you to filter your data across multiple columns before totaling the result. For example, you can use it to find the total sales for a specific salesperson, in a specific region, during a specific month.

What You'll Need

  • A computer with Microsoft Excel installed (all modern versions support SUMIFS).
  • A dataset containing at least one column of numbers to sum and one or more columns containing the categories or dates you want to filter by.
  • A basic understanding of how to select cell ranges in a spreadsheet.

Step-by-Step

  1. Organize Your Data: Ensure your data is arranged in a table or a clean grid. For SUMIFS to work accurately, your "Sum Range" (the numbers you want to add) and your "Criteria Ranges" (the columns you are checking) must be the same size. If your sum range is rows 2 through 100, every criteria range must also be rows 2 through 100.
  2. Select the Target Cell: Click on the empty cell where you want the final total to appear. Type =SUMIFS( to begin the function.
  3. Define the Sum Range: The first argument in a SUMIFS formula is always the range of cells containing the numbers you want to total. Highlight this column or type the range (e.g., C2:C100). After selecting this, type a comma.
  4. Set the First Criteria Range: Now, select the first column that contains the criteria you want to check. For example, if you only want to sum values for "North Region," select the column containing the region names (e.g., A2:A100). Type a comma.
  5. Enter the First Criterion: Specify what the formula should look for in that first range. You can do this in two ways:
    • Direct Entry: Type the text in quotation marks, such as "North".
    • Cell Reference: Click on a cell that contains the word "North" (e.g., E2). This is generally better because you can change the value in cell E2 to update the total without editing the formula.
    Type a comma to move to the next condition.
  6. Add Additional Criteria Pairs: This is where SUMIFS differs from SUMIF. You can now repeat the process of "Range, then Criterion" for as many conditions as you need. For instance, if you also want to filter by the month of "January," select the date column (B2:B100), type a comma, and then enter "January" or a cell reference containing that word.
  7. Close the Formula: Once you have added all your necessary conditions, type a closing parenthesis ) and press Enter.
  8. Verify the Result: Double-check a few rows of your data manually to ensure the formula is capturing the correct entries and ignoring those that do not meet all the specified criteria.

Common Mistakes

One of the most frequent errors is swapping the Sum Range and the Criteria Range. In the older SUMIF (singular) function, the sum range comes last. In SUMIFS (plural), the sum range must come first. If you put the criteria range first, Excel will either return a 0 or an error because it is trying to sum text instead of numbers.

Another common mistake is mismatched range sizes. If your sum range is C2:C100 but your criteria range is A2:A50, Excel will return a #VALUE! error. The ranges must be perfectly aligned in height and width.

Users also frequently forget quotation marks when entering text criteria directly into the formula. If you type =SUMIFS(C2:C100, A2:A100, North) without quotes around North, Excel will think "North" is a named range rather than a piece of text, resulting in a #NAME? error. Always use "North".

Finally, be careful with hidden characters. If your data contains trailing spaces (e.g., "North " instead of "North"), the SUMIFS function will treat them as different values and will not include those rows in the total, often leading to a result of 0 when you expect a higher number.

Tips

To make your SUMIFS formulas more dynamic, use cell references instead of hard-coded text. Instead of typing "January", point the formula to cell F1. This allows you to create a dashboard where you can simply change the text in F1 to see totals for different months instantly.

You can use logical operators to sum ranges based on values rather than exact text. For example, to sum all sales greater than 500, use ">500" as your criterion. If the value 500 is in cell G1, the syntax becomes ">"&G1.

Wildcards are incredibly useful for partial matches. The asterisk (*) represents any number of characters. If you want to sum everything that starts with "West" (e.g., "West Coast," "West Midlands"), use "West*" as your criterion. The question mark (?) represents a single character.

If you find yourself writing extremely long SUMIFS formulas with ten or more criteria, consider using a Pivot Table. Pivot Tables can achieve the same result through a drag-and-drop interface and are often easier to audit for errors than a massive formula.

Troubleshooting

If your SUMIFS formula is returning 0 but you know there is data that matches your criteria, first check for data type mismatches. Ensure that the numbers in your Sum Range are actually formatted as numbers and not as text. You can tell if a number is stored as text if it is left-aligned in the cell or has a small green triangle in the top-left corner.

If you see a #VALUE! error, check your range dimensions. Ensure every range in the formula starts and ends on the same row number. For example, if one range is A2:A100 and another is B1:B100, the formula will fail because the ranges are not the same size.

If the result is lower than expected, check for spelling errors or extra spaces in your criteria columns. A common fix is to use the TRIM function on your data columns to remove invisible leading or trailing spaces that prevent the SUMIFS function from finding a match.

If you get a #NAME? error, check your syntax. Ensure you haven't misspelled the function name as "SUMIFSS" and that all text criteria are enclosed in double quotation marks.

Frequently Asked Questions

Can SUMIFS handle dates?

Yes. You can use dates as criteria. You can reference a cell containing a date or use operators like ">=1/1/2023" to sum values that occurred after a specific date.

What is the difference between SUMIF and SUMIFS?

SUMIF is designed for a single condition. SUMIFS is designed for multiple conditions (up to 127). Importantly, the order of arguments is different: SUMIFS puts the sum range first, while SUMIF puts it last.

Can I use "OR" logic in a SUMIFS formula?

SUMIFS natively uses "AND" logic, meaning all conditions must be true. To achieve "OR" logic (e.g., sum if region is North OR South), you can simply add two SUMIFS formulas together: =SUMIFS(...) + SUMIFS(...).

Does SUMIFS work across different worksheets?

Yes. You can select ranges from other sheets. When you click over to another sheet while building the formula, Excel will automatically add the sheet name to the range (e.g., Sheet2!A2:A100).

Can I sum based on a blank cell?

Yes. To sum values where a specific criteria cell is empty, use "" (two double quotes) as the criterion. To sum values where the cell is NOT empty, use "<>".