How to Use SUMIF in Excel
Learn how to add values that meet a specific condition.
You will learn to
- Use the SUMIF function to calculate sales for a selected category
- Choose the right criteria range and sum range
- Reference a criteria cell instead of typing text
How it works
SUMIF adds only the numbers whose matching row meets a condition. It takes three arguments: the range to test, the criteria, and the range to add. For example, =SUMIF(A2:A7,"Electronics",B2:B7) checks each category in column A and adds the matching sales from column B.
Criteria can be text ("Electronics"), a comparison (">1000"), a wildcard ("Elec*") or a cell reference (E2). For more than one condition, use SUMIFS.
=SUMIF(A2:A7,"Electronics",B2:B7)