Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Excel SUMIFS: How to Sum with Multiple Criteria

· 6 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

To sum values based on more than one criteria in Excel, you must use the SUMIFS function. While the standard SUMIF function only allows for a single condition, SUMIFS allows you to specify multiple criteria across different ranges, totaling only the cells that meet every single requirement you set. For example, if you have a sales spreadsheet, you can use SUMIFS to calculate the total revenue for a specific salesperson, in a specific region, during a specific month.

What You'll Need

  • A computer with Microsoft Excel installed (works in Excel 2007 and all newer versions, including Microsoft 365).
  • A dataset containing at least one column of numbers to be summed and at least one column of categories or dates to act as criteria.
  • Basic familiarity with selecting cell ranges (e.g., A2:A100).

Step-by-Step

  1. Organize Your Data: Ensure your data is in a clean table format. Each column should have a clear header (e.g., "Date", "Product", "Salesperson", "Amount"). Make sure there are no completely empty rows or columns within your data block, as this can sometimes cause range errors.
  2. Select Your Target Cell: Click on the empty cell where you want the final total to appear.
  3. Start the Formula: Type =SUMIFS( into the cell. This opens the function. Note that the order of arguments in SUMIFS is different from the basic SUMIF; in SUMIFS, the range you want to sum always comes first.
  4. Define the Sum Range: Highlight the column containing the numbers you want to add up. For example, if your sales amounts are in column D from row 2 to 100, your formula should now look like =SUMIFS(D2:D100,. Press the comma key to move to the next argument.
  5. Define the First Criteria Range: Highlight the column that contains the first category you want to filter by. If you want to filter by "Product" located in column B, highlight B2:B100. Your formula now looks like =SUMIFS(D2:D100, B2:B100,.
  6. Enter the First Criterion: Tell Excel what specific value to look for in that first range. You can do this in two ways:
    • Direct Entry: Type the value in quotation marks, such as "Widget".
    • Cell Reference: Click on a cell that contains the word "Widget" (e.g., F2). This is the preferred method because it allows you to change the criteria without editing the formula.
    Your formula now looks like =SUMIFS(D2:D100, B2:B100, F2,.
  7. Add Additional Criteria: Repeat steps 5 and 6 for every additional condition you have. For example, if you also want to filter by "Region" in column C (C2:C100) for the value "North" (G2), add those to the formula: =SUMIFS(D2:D100, B2:B100, F2, C2:C100, G2,.
  8. Close and Execute: Once all your ranges and criteria are entered, type a closing parenthesis ) and press Enter. Excel will now scan the data and sum only the rows where every single criterion is true.

Common Mistakes

One of the most frequent errors users make is confusing the SUMIF and SUMIFS syntax. In SUMIF (singular), the sum range is usually the last argument. In SUMIFS (plural), the sum range is always the first argument. If you swap these, Excel will likely return a #VALUE! error because it is trying to sum a column of text.

Another common mistake is mismatched range sizes. For SUMIFS to work, every range you select must be the exact same length. If your sum range is D2:D100 (99 cells) but your criteria range is B2:B101 (100 cells), the formula will fail. Always double-check that your row numbers match across all arguments.

Users also frequently forget quotation marks when entering text or logical operators directly into the formula. If you want to sum values greater than 100, you cannot simply type >100; you must type ">100". However, if you are referencing a cell that already contains the value 100, you must concatenate the operator: ">"&F2.

Tips

Use Tables for Dynamic Ranges: Instead of using fixed ranges like D2:D100, convert your data into an official Excel Table (Select data > Ctrl+T). When you use Table References (e.g., ), the formula automatically updates when you add new rows to the bottom of the table, meaning you never have to rewrite your ranges.

Utilize Wildcards: If you don't need an exact match, use wildcards. An asterisk (*) represents any number of characters. For example, if you want to sum everything that starts with "North" (North East, North West), use "North*" as your criterion. A question mark (?) represents a single character.

Combine with Data Validation: Create a dropdown menu (Data > Data Validation > List) in your criteria cells (like F2 and G2). This allows you to switch between products or regions instantly, and the SUMIFS formula will update the total in real-time without you having to touch the formula bar.

Troubleshooting

If your formula is returning 0 when you know there should be a total, the most common cause is a data type mismatch. Check if your "numbers" are actually formatted as text. You can tell if there is a small green triangle in the corner of the cell or if the numbers are aligned to the left. To fix this, select the column, go to the Data tab, select Text to Columns, and click Finish immediately to force Excel to re-evaluate the data types.

If you are getting a #VALUE! error, check your range dimensions. Ensure that every range in the formula starts and ends on the same row number. If one range is B2:B50 and another is C2:C51, the formula will break.

If the result is incorrect, check for hidden spaces in your text. "Widget" is not the same as "Widget " (with a trailing space). You can use the =TRIM() function in a helper column to remove these invisible spaces from your data before running the SUMIFS.

If you are using date criteria and the formula isn't working, ensure your dates are actual Excel date values and not just text that looks like a date. Try changing the cell format to "Number"; if the date changes to a five-digit number (e.g., 45123), it is a real date. If it stays as "01/01/2023", it is text and will not be recognized by logical operators like ">"&DATE(2023,1,1).

Frequently Asked Questions

Can I use SUMIFS with "OR" logic?

Standard SUMIFS uses "AND" logic, meaning all conditions must be true. To use "OR" logic (e.g., sum if product is "Widget" OR "Gadget"), you can simply add two SUMIFS formulas together: =SUMIFS(...) + SUMIFS(...).

How many criteria can I add to a SUMIFS formula?

Excel allows up to 127 pairs of criteria ranges and criteria. In practice, most users rarely exceed five or six, but the capacity is very high.

Does SUMIFS work across different worksheets?

Yes. When selecting your ranges, you can click over to another sheet. Excel will automatically add the sheet name to the reference, such as 'Sales Data'!D2:D100.

Can I use a cell reference for a logical operator?

Yes, but you must use the ampersand (&) to join the operator and the cell. For example, to sum values greater than the value in cell A1, use ">"&A1.

Is there a difference between SUMIFS and SUMPRODUCT?

SUMIFS is generally faster and easier to read for simple conditional summing. SUMPRODUCT is more powerful and can handle calculations within the ranges (like multiplying two columns before summing them), but it is more complex to write.