EXAMPLE + HANDS-ON PRACTICE
SUMIF practice with expense data
SUMIF answers a question such as “How much did we spend on travel?” It checks a condition in one range and adds the matching amounts in another. This is useful when a transaction list mixes several categories.
A small worked example
Suppose column A contains the category and column B contains the amount:
| Row | A: Category | B: Amount |
|---|---|---|
| 2 | Travel | 40 |
| 3 | Office | 25 |
| 4 | Travel | 60 |
=SUMIF(A2:A4,"Travel",B2:B4)The result is 100: 40 plus 60. The office amount is excluded. The first argument tells Excel where to check the condition; the last argument tells it which amounts to add.
Three mistakes to check
- Missing quotes: text conditions need double quotes, such as
"Travel". Comparison conditions also use quotes, such as">50". - Misaligned ranges: use the same first and last row for the condition and amount ranges.
- Wrong function: COUNTIF counts matching entries; SUMIF adds their amounts.
Try it yourself
In the simulator, use SUMIF to find the Software subtotal in an eight-row fictional ledger. Select the target cell, type your formula, and check the result. A hint explains which columns to use. After solving it, choose New numbers to test the same formula on changed amounts.
When you need two conditions
To total only Travel entries that are also Paid, use SUMIFS. Unlike SUMIF, SUMIFS takes the amount range first, followed by pairs of condition range and condition. Our monthly review project helps you combine category totals, percentages and budget comparisons.
Examples use English function names and comma separators. Your Excel language settings may use different names or separators.
Product reference: Microsoft documentation. Teaching examples and fictional data by StatementNest.