0
0
ExcelHow-ToBeginner ยท 3 min read

How to Use SUMIF in Excel: Simple Guide with Examples

Use the SUMIF function in Excel to add values that meet a specific condition. The formula looks like =SUMIF(range, criteria, [sum_range]), where range is checked against the criteria, and matching values in sum_range are added.
๐Ÿ“

Syntax

The SUMIF function has three parts:

  • range: The cells you want to check for the condition.
  • criteria: The condition that decides which cells to add.
  • sum_range (optional): The cells to add if the condition is true. If omitted, Excel adds the cells in range.
excel
=SUMIF(range, criteria, [sum_range])
๐Ÿ’ป

Example

This example adds sales amounts only for the product "Apple".

excel
A1:A5 (Products): Apple, Banana, Apple, Orange, Apple
B1:B5 (Sales): 10, 20, 15, 5, 25

Formula in C1:
=SUMIF(A1:A5, "Apple", B1:B5)
Output
50
โš ๏ธ

Common Pitfalls

Common mistakes include:

  • Forgetting quotes around text criteria, e.g., use "Apple" not Apple.
  • Not matching the size of sum_range to range.
  • Using wrong operators without quotes, e.g., use ">10" not >10.
excel
Wrong: =SUMIF(A1:A5, Apple, B1:B5)  (missing quotes around Apple)
Right: =SUMIF(A1:A5, "Apple", B1:B5)
๐Ÿ“Š

Quick Reference

PartDescriptionExample
rangeCells to check conditionA1:A5
criteriaCondition to match"Apple" or ">10"
sum_rangeCells to add if condition trueB1:B5 (optional)
โœ…

Key Takeaways

Use SUMIF to add numbers based on a condition in another range.
Always put text criteria inside quotes, like "Apple".
Make sure sum_range matches the size of range if used.
Use quotes around operators in criteria, e.g., ">10".
If sum_range is omitted, SUMIF adds cells from range itself.