COUNTIF vs COUNTIFS with practical examples

COUNTIF counts cells that pass one test. COUNTIFS counts rows that pass every test. The attendance tracker uses the same pair of functions on a roster.

The eight household amounts are $86.40, $1,900, $48.25, $112.17, $143.60, $42, $30, and $800. Four are over $100: $1,900, $112.17, $143.60, and $800.

=COUNTIF(A2:A9,">100")

The > has to sit inside quotes. A bare >100 is not the criteria. COUNTIF adds nothing. It returns 4.

COUNTIF
=COUNTIF(A2:A9,">100")
=COUNTIF(A2:A9,">100")B10
Amounts over $100
AB
1Amount
286.40
31900
448.25
5112.17
6143.60
742
830
9800
10Over $1004
A picture of the COUNTIF page. The four amounts over $100 are 1900, 112.17, 143.60, and 800. The comparison has to be text, so the greater-than sign is inside quotes.

One test, then both

The five orders are TX $120, CA $80, TX $40, NY $200, and TX $90.

COUNTIF of the state column for TX is 3. COUNTIF of the amount column for >=100 is 2. Those two are the $120 and the New York $200. The $90 is under $100, so it is not in that 2.

COUNTIFS keeps a row only when every test passes:

=COUNTIFS(A2:A6,"TX",B2:B6,">=100")

The Texas $120 passes both. The Texas $40 and the Texas $90 fail the amount test. The New York $200 fails the state test. The count is 1.

COUNTIFS
=COUNTIFS(A2:A6,"TX",B2:B6,">=100")
=COUNTIFS(A2:A6,"TX",B2:B6,">=100")B9
Texas, and at least $100
AB
1StateAmount
2TX120
3CA80
4TX40
5NY200
6TX90
7TX3
8>= 1002
9Both1
A picture of the five orders. COUNTIF of TX is 3. COUNTIF of the amount >= 100 is 2, the $120 and the New York $200. COUNTIFS requires both, so only the Texas $120 counts. The Texas $90 is under $100.

Texas or California is two COUNTIF results added, 3 + 1 = 4. Putting both states in one COUNTIFS would require a row to be TX and CA at the same time, and that count is 0.

COUNTIF is not case-sensitive. On the unique-values page, austin, Austin, and Austin are three COUNTIF hits and four UNIQUE rows. The ranges in one COUNTIFS have to be the same size. Different sizes are #VALUE!.

The PTO tracker uses COUNTIFS on dates, which is a different pair of tests. Avery’s ended periods from June 16 through November 15, 2026 are 10. Jordan’s are 21.


Template for this article

Attendance Tracker

More from the blog