Syntax
=COUNTIFS(criteria_range1, criteria1, [criteria_range2], [criteria2], ...)Arguments
| Argument | Required | Description |
|---|---|---|
criteria_range1 | Required | The first range to check |
criteria1 | Required | The condition for the first range |
criteria_range2 | Optional | More ranges |
criteria2 | Optional | More 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 Data in the sheet
| A | B | |
|---|---|---|
| 1 | 1 | y |
| 2 | 2 | y |
| 3 | 3 | n |
Related statistical functions
- COUNTCounts how many numbers are in a list or range.
- COUNTACounts the cells and values that are not empty.
- COUNTBLANKCounts the empty cells in a range, including cells holding empty text.
- COUNTIFCounts the cells in a range that meet a condition.
- COVARIANCE.PReturns the population covariance of two sets of numbers.
- COVARIANCE.SReturns the sample covariance of two sets of numbers.
- DEVSQReturns the sum of squared deviations of the numbers from their mean.
- EXPON.DISTReturns the exponential distribution.
- F.DISTReturns the left tailed F probability distribution.