ElyxAI
formulas

How to Use SUMIF

Excel 2007Excel 2010Excel 2013Excel 2016Excel 2019Excel 365Excel Online

Learn how to use SUMIF to conditionally sum cells based on a single criterion. This essential formula automatically calculates totals for specific categories, saving time on manual calculations and enabling dynamic data analysis in spreadsheets.

Why This Matters

SUMIF automates conditional calculations, enabling faster financial analysis, sales reporting, and data summarization without manual filtering.

Prerequisites

  • Understanding of basic Excel navigation and cell references
  • Familiarity with SUM function fundamentals
  • Knowledge of organized data in columns or rows

Step-by-Step Instructions

1

Open your spreadsheet with data

Launch Excel and open a file containing data with categories in one column and values to sum in another (e.g., product names in column A, sales amounts in column B).

2

Click the target cell for your formula

Select an empty cell where you want the SUMIF result to appear, typically below or beside your data range.

3

Type the SUMIF formula

Enter the formula: =SUMIF(range, criteria, sum_range). Replace 'range' with your criteria column (e.g., A2:A10), 'criteria' with the value to match (e.g., "Apple"), and 'sum_range' with values to sum (e.g., B2:B10).

4

Press Enter to execute

Hit Enter to calculate the result. Excel will sum all values in sum_range where the corresponding cell in range matches your criteria.

5

Verify and copy the formula

Check that the result is correct, then copy the formula down to other cells if needed by dragging the fill handle or using Ctrl+D.

Alternative Methods

Using wildcards for partial matches

Replace the criteria with a wildcard pattern like "Apple*" to match any text beginning with "Apple" in your SUMIF formula.

SUMIFS for multiple criteria

Use SUMIFS instead when you need to sum based on multiple conditions across different columns.

Using cell reference as criteria

Instead of typing the criteria directly, reference a cell (e.g., =SUMIF(A:A, B1, C:C)) for dynamic criteria based on user input.

Tips & Tricks

  • Use absolute references ($A$2:$A$10) if you plan to copy your formula to prevent range shifts.
  • SUMIF is case-insensitive, so "apple" and "APPLE" will be treated the same.
  • Leave the sum_range parameter blank if criteria and sum ranges are identical.
  • Use >50 or <100 as criteria for numeric comparisons without quotes.

Pro Tips

  • Combine SUMIF with IFERROR to handle missing matches gracefully: =IFERROR(SUMIF(...), 0).
  • Use SUMIF with entire columns (e.g., A:A, B:B) for flexibility when data is added dynamically.
  • Nest SUMIF within other functions like IF or SUM to create complex conditional calculations.
  • Remember that SUMIF sums only the first matching criterion; use SUMIFS for AND logic.

Troubleshooting

Formula returns 0 even though matching data exists

Check for extra spaces in your criteria or data. Use TRIM function or search for exact matches. Verify data types match (text vs. numbers).

#NAME? error appears

Ensure SUMIF is spelled correctly and available in your Excel version. Some regional versions use different function names; check your language settings.

Formula returns wrong total

Verify that sum_range corresponds correctly to criteria range rows. Check for duplicate entries or hidden rows that might affect calculations.

Criteria with numbers not matching

Numbers stored as text won't match numeric criteria. Convert using VALUE() function or ensure consistent formatting across your data.

Related Excel Formulas

Frequently Asked Questions

Can SUMIF handle multiple criteria?
No, SUMIF handles only one criterion. For multiple criteria, use SUMIFS instead, which supports AND logic across multiple columns.
What's the difference between SUMIF and SUMIFS?
SUMIF sums based on one criterion in a single range, while SUMIFS allows multiple criteria across different ranges with AND logic.
Does SUMIF work with dates?
Yes, SUMIF works with dates using comparison operators like =SUMIF(A:A, ">="&DATE(2024,1,1), B:B) to sum values for dates on or after January 1, 2024.
Can I use wildcards in SUMIF?
Yes, wildcards like * (any characters) and ? (single character) work in SUMIF for partial text matches, e.g., =SUMIF(A:A, "App*", B:B) matches "Apple" and "Application".
Why is my SUMIF returning #VALUE! error?
This error typically occurs when criteria contains incompatible data types or formula syntax is incorrect. Check for mismatched quotes, missing parentheses, or data type conflicts.

This was one task. ElyxAI handles hundreds.

Sign up