Excel + Google Sheets · COUNTIFS
Count with several conditions
Counts the rows that meet every condition at once.
The formula
=COUNTIFS(A2:A6, "North", B2:B6, "Won")What each part means
A2:A6, "North"1st conditionB2:B6, "Won"2nd condition
Example
| A | B | |
|---|---|---|
| 1 | Region | Result |
| 2 | North | Won |
| 3 | South | Won |
| 4 | North | Lost |
| 5 | North | Won |
| 6 | South | Lost |
| 7 | North + Won |
| A | B | |
|---|---|---|
| 1 | Region | Result |
| 2 | North | Won |
| 3 | South | Won |
| 4 | North | Lost |
| 5 | North | Won |
| 6 | South | Lost |
| 7 | North + Won | 2 |
Step by step
- Click cell B7.
- Type the formula:
=COUNTIFS(A2:A6, "North", B2:B6, "Won") - Press Enter.
- Drag the small square in the bottom-right corner of the cell down to copy it to the other rows.
Where it works
- Every version of Excel
- Google Sheets
- Excel for the web (free)
The same formula in other languages
- English COUNTIFS
- Español CONTAR.SI.CONJUNTO
- Português CONT.SES