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)

ArgumentWhat it is
rangeThe cells to check.
criteriaThe 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.

Advertising
Loading ad...

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.

Example=COUNTIF(C2:C9,"Pagada")CONTAR.SI = COUNTIF

In F2, count how many invoices are paid.

F2
ABCDEFG
1InvoiceAmountStatus
2F-1012,300PaidPaid invoices
3F-1021,450Pending
4F-103980Paid
5F-1045,200Overdue
6F-105760Paid
7F-1063,100Pending
8F-1071,890Paid
9F-108640Overdue
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".