1. Home
  2. Functions
  3. Statistical
  4. COUNTIFS

COUNTIFS function

Counts the cells that meet all of several conditions.

Syntax

=COUNTIFS(criteria_range1, criteria1, [criteria_range2], [criteria2], ...)

Arguments

ArgumentRequiredDescription
criteria_range1RequiredThe first range to check
criteria1RequiredThe condition for the first range
criteria_range2OptionalMore ranges
criteria2OptionalMore conditions

How to use COUNTIFS

COUNTIFS takes 2 required arguments and 2 optional arguments, and accepts more values in the same pattern. Type =COUNTIFS( in a cell and SheetsBat shows the arguments as you go. Optional arguments are shown in square brackets; leave them out to use their default.

Examples

Each result below was calculated by the SheetsBat formula engine.

=COUNTIFS(A1:A3, ">1", B1:B3, "y")Result 1
Data in the sheet
AB
11y
22y
33n

Every formula, right in your browser

SheetsBat calculates 536 functions, with charts, pivot tables and live collaboration. Free to start.