cellio

COUNTIF in Google Sheets: Count Cells That Match

How COUNTIF and COUNTIFS work in Google Sheets: count text, numbers above a value, blanks, partial matches and checkboxes, with examples you can copy.

By Ayoub Farid · · 1 min read

COUNTIF counts cells that meet one condition; COUNTIFS counts rows meeting several. Both work identically in Google Sheets and Excel.

COUNTIF

=COUNTIF(range, criterion)
CountFormula
Exact text=COUNTIF(B2:B200,"Paid")
Above a number=COUNTIF(C2:C200,">100")
Above a cell value=COUNTIF(C2:C200,">"&F1)
Contains text=COUNTIF(A2:A200,"*refund*")
Blanks=COUNTIF(B2:B200,"")
Not blank=COUNTIF(B2:B200,"<>")
Ticked checkboxes=COUNTIF(D2:D200,TRUE)

COUNTIFS

=COUNTIFS(B2:B200,"Paid",C2:C200,">100")

All conditions must be true. Between two dates:

=COUNTIFS(A2:A200,">="&F1,A2:A200,"<="&F2)

Count unique values

=COUNTUNIQUE(B2:B200)

(Sheets-only function.)

Percentage

=COUNTIF(B2:B200,"Paid")/COUNTA(B2:B200)

Common mistakes

  • Missing quotes around conditions.
  • ">F1" instead of ">"&F1.
  • Hidden spaces in text. Clean with TRIM.

More in COUNTIF and COUNTIFS.

Frequently asked questions

How do I use COUNTIF in Google Sheets?

=COUNTIF(range,"condition"), e.g. =COUNTIF(B:B,"Paid").

How do I count checkboxes in Google Sheets?

=COUNTIF(range,TRUE).

How do I count with multiple conditions?

Use COUNTIFS with pairs of ranges and conditions.

How do I count unique values in Google Sheets?

=COUNTUNIQUE(range).

Keep reading