Excel functions / Maths & statistics
COUNTIFS
Counts the rows that meet several conditions at once.
Syntax
=COUNTIFS(criteria_range1, criteria1, [criteria_range2, criteria2], ...)Arguments
criteria_range, criteria | Pairs of a range and its condition. A row is counted only when every pair matches. |
|---|
How it works
COUNTIFS counts rows where all the conditions are true: West reps with sales over 400, or tasks that are both open and overdue.
Each range must be the same size, because COUNTIFS compares them row by row.
Example
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Region | Rep | Sales | ||
| 2 | East | Ana | 500 | 1 | |
| 3 | West | Ben | 300 | ||
| 4 | East | Cal | 250 | ||
| 5 | West | Dee | 700 | ||
| 6 |
Result: 1. Only Dee is in the West with over 400.
Tips
- To count values between two numbers, test the same column twice: ">=100" and "<=200".
Practise COUNTIFS
Try it yourself in a real spreadsheet, with instant feedback on every answer.