SUMIF(S), COUNTIF(S) and AVERAGEIF
Real data is mixed: many regions, many products. These functions give the total, count or average for just one group.
- LearnRead the guide and its worked examples.
- PractiseA drill on just this skill, easier tasks first. Stuck? “Show me how”.
- TestA timed mock in the style your employer named.
- ReviewYour report shows what cost marks and what to practise next.
The functions
- SUMIF
=SUMIF(range, criteria, sum_range) - Adds the sum_range values on rows where range matches the criteria.
- SUMIFS
=SUMIFS(sum_range, range1, criteria1, range2, criteria2, ...) - Adds values that match every condition. Note that sum_range comes first.
- COUNTIF
=COUNTIF(range, criteria) - Counts the cells that match.
- COUNTIFS
=COUNTIFS(range1, criteria1, range2, criteria2, ...) - Counts rows that match every condition.
- AVERAGEIF
=AVERAGEIF(range, criteria, average_range) - Averages the values on matching rows.
Worked examples
Example 1 Total sales for the North region
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Region | Rep | Sales | North total | |
| 2 | North | Amy | 1,200 | 3,100 | |
| 3 | South | Ben | 900 | ||
| 4 | North | Cara | 1,500 | ||
| 5 | East | Dev | 700 | ||
| 6 | North | Ben | 400 | ||
| 7 | South | Cara | 1,100 |
=SUMIF(A2:A7,"North",C2:C7) and shows 3,100 (highlighted).Piece by piece
A2:A7- Where to look for the rule: the Region column.
"North"- The rule: the region is North. Capitals don't matter.
C2:C7- What to add up: the Sales on those rows. 1200 + 1500 + 400 = 3100.
Example 2 Count sales of 1000 or more
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Region | Rep | Sales | 1000+ | |
| 2 | North | Amy | 1,200 | 3 | |
| 3 | South | Ben | 900 | ||
| 4 | North | Cara | 1,500 | ||
| 5 | East | Dev | 700 | ||
| 6 | North | Ben | 400 | ||
| 7 | South | Cara | 1,100 |
=COUNTIF(C2:C7,">=1000") and shows 3 (highlighted).Piece by piece
C2:C7- The Sales column.
">=1000"- The rule, in quotes: 1000 or more. 1200, 1500 and 1100 match.
Example 3 Total for one rep in one region
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Region | Rep | Sales | Ben, North | |
| 2 | North | Amy | 1,200 | 400 | |
| 3 | South | Ben | 900 | ||
| 4 | North | Cara | 1,500 | ||
| 5 | East | Dev | 700 | ||
| 6 | North | Ben | 400 | ||
| 7 | South | Cara | 1,100 |
=SUMIFS(C2:C7,A2:A7,"North",B2:B7,"Ben") and shows 400 (highlighted).Piece by piece
C2:C7- What to add up. In SUMIFS this comes first.
A2:A7,"North"- First rule: the region is North.
B2:B7,"Ben"- Second rule: the rep is Ben. Only row 6 matches both, so the answer is 400.
Common mistakes
- Mixing up the order: SUMIF puts the range to add last, SUMIFS puts it first.
- Ranges of different sizes, such as A2:A7 with C2:C6. Keep every range the same height.
- Leaving the quotes off an operator rule. Write ">=1000", not >=1000.
- Typing "North " with a trailing space, which matches nothing.
Excel and Google Sheets
In Excel: All five work the same in every recent version. Wildcards work in the rule: "N*" matches anything starting with N.
In Google Sheets: Same functions, same order of arguments, same wildcards.
Now practise it
Reading gets you started; doing it under a clock is what the test checks. Practise this skill on its own, easier tasks first, then take a mock.
Practise in the Excel style Practise in the Google Sheets style
Skill drills come with the 30-day and 90-day passes. No pass yet? Try the free five-task mini-mock, no account needed.