A SUMIF in Excel is used to sum values in a range that meet a specific condition.
Steps to Use SUMIF in Excel
-
Identify the range to evaluate
This is the range where Excel checks for your condition. -
Specify the condition (criteria)
The condition can be a number, text, expression, or cell reference. -
Define the sum range
This is the range of cells to sum when the condition is met. It can be the same as the range to evaluate.
SUMIF Formula Structure
The formula structure is:
=SUMIF(range, criteria, [sum_range])
-
range→ Cells to evaluate. -
criteria→ Condition to meet. -
[sum_range]→ Cells to sum. Optional; if omitted, Excel sums the cells inrange.
Examples
Example 1: Sum sales greater than 500
Suppose column A contains sales values and column B contains product names. To sum sales greater than 500:
=SUMIF(A2:A10, ">500")
This sums all values in A2:A10 that are greater than 500.
Example 2: Sum sales for a specific product
To sum sales in column A for a product named "Widget" in column B:
=SUMIF(B2:B10, "Widget", A2:A10)
This sums the values in A2:A10 where the corresponding cell in B2:B10 equals "Widget".
Example 3: Using a cell reference as criteria
If cell D1 contains the text "Widget", use:
=SUMIF(B2:B10, D1, A2:A10)
Excel sums all sales in column A where column B matches the value in D1.
Tips for Using SUMIF
-
Wildcards for partial matches
-
*→ Represents any number of characters. -
?→ Represents a single character.
Example:=SUMIF(B2:B10, "*Wid*", A2:A10)
Sums all rows containing "Wid" anywhere in the product name.
-
-
Using logical operators
Combine conditions like greater than, less than, or equal to with quotes:">100", "<=500", "<>0"
-
SUMIFS for multiple conditions
SUMIF handles one condition. Use SUMIFS when multiple conditions are needed:=SUMIFS(sum_range, criteria_range1, criteria1, criteria_range2, criteria2)
-
Windows vs Mac differences
Formulas work the same. Auto-complete of formula names may differ slightly in Mac Excel.
Common Errors
-
#VALUE! → Occurs if ranges are of different sizes.
-
#NAME? → Occurs if the formula is misspelled.
-
Not summing correctly → Check for extra spaces in text criteria or mismatched data types.
This method efficiently sums data based on conditions, making it ideal for financial reports, sales tracking, and performance analysis.