Functions
COUNTIFS
Count rows where all criteria match
Try it
When to use it
When should I use COUNTIFS instead of COUNTIF?
Use COUNTIFS to count rows that satisfy several conditions at once; use COUNTIF when you have just one condition.
Do all the conditions in COUNTIFS have to match?
Yes. COUNTIFS only counts an item when every range/criteria pair it lists is satisfied for that position.
Use cases
Count rows matching two conditions
Count items in a target range
Used in
Syntax
COUNTIFS(range1, criterion1, ...)Examples
=COUNTIFS({10,25,30,15,22},">20",{10,25,30,15,22},"<30") // => 2
=COUNTIFS({"Yes","No","Yes","Yes"},"Yes") // => 3
=COUNTIFS({1,2,3,4,5},">2",{10,20,30,40,50},"<45") // => 2