Excel COUNTIF function
Counts the cells in a range that meet a condition. In Spanish Excel it is called CONTAR.SI.
Syntax
English Excel
=COUNTIF(range, criteria)
Spanish Excel (Mexico)
=CONTAR.SI(rango, criterio)
Spanish Excel (Spain, Latin America)
=CONTAR.SI(rango; criterio)
| Argument | What it is |
|---|---|
| range | The cells to check. |
| criteria | The condition: a value ("Paid"), an operator (">1000") or a cell. |
Example
COUNTIF(range, criteria) counts the cells that meet a criterion. Text criteria go in quotes and are not case-sensitive.
=COUNTIF(C2:C9,"Paid")
Common mistake
The operator goes in quotes and the cell outside: ">="&F2. Writing ">=F2" looks for the text "F2".
About Ads
This site uses Google AdSense to display ads. These ads help us keep WebHerramientas completely free. Ads are managed by Google and meet strict security and privacy standards.
Ads help us keep WebHerramientas free for everyone
Practice COUNTIF
Type the formula in the sheet and check it instantly. Spanish or English function names both work. See all lessons
COUNTIF
COUNTIF(range, criteria) counts the cells that meet a criterion. Text criteria go in quotes and are not case-sensitive.
In F2, count how many invoices are paid.
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | Invoice | Amount | Status | ||||
| 2 | F-101 | 2,300 | Paid | Paid invoices | |||
| 3 | F-102 | 1,450 | Pending | ||||
| 4 | F-103 | 980 | Paid | ||||
| 5 | F-104 | 5,200 | Overdue | ||||
| 6 | F-105 | 760 | Paid | ||||
| 7 | F-106 | 3,100 | Pending | ||||
| 8 | F-107 | 1,890 | Paid | ||||
| 9 | F-108 | 640 | Overdue | ||||
| 10 |
Tip: while typing, click a cell or drag across several to insert their reference.
Frequently asked questions
- What is COUNTIF called in Spanish?
- In Spanish Excel it is CONTAR.SI. The formula =COUNTIF(C2:C9,"Paid") is written =CONTAR.SI(C2:C9;"Pagada") (or with commas in Mexico).
- Why does COUNTIF use semicolons in some Excel versions?
- It depends on regional settings. Where the comma is the decimal mark (Spain, much of South America), Excel separates arguments with semicolons. English Excel and Mexican Spanish Excel use commas.
- What is the most common COUNTIF mistake?
- The operator goes in quotes and the cell outside: ">="&F2. Writing ">=F2" looks for the text "F2".