COUNTIFS

COUNTIFS counts the number of cells that meet one or more conditions across one or more ranges.

Syntax

=COUNTIFS(range1, criteria1, [range2, criteria2], ...)

Example - Single Condition

=COUNTIFS(B2:B100, "Noida")
' Counts how many rows have "Noida" in column B

Example - Multiple Conditions

=COUNTIFS(B2:B100, "Noida", C2:C100, ">=50")
' Counts rows where city is "Noida" AND score is 50 or more

Using Comparison Operators

Criteria can include operators like ">=", "<>", or wildcards like "*python*" for partial text matches.

=COUNTIFS(D2:D100, "<>", D2:D100, "<>0")
' Counts non-blank, non-zero cells
Unlike COUNTIF, which only supports one condition, COUNTIFS requires every condition to be true for a row to be counted - it applies an AND logic across all criteria pairs.

Ready to Master Data Science?

Join Uncodemy's Data Science Course and build real, job-ready skills with expert mentors.

Explore Course