Excel
COUNTIFS function in Excel
Counts the number of cells within a range that meet multiple criteria
=COUNTIFS(criteria_range1, criteria1, [criteria_range2, criteria2]…)COUNTIFS syntax and parameters
Four arguments, two required.
- criteria_range1rangeRequired
The first range in which to evaluate the associated criteria.
- criteria1anyRequired
The criteria in the form of a number, expression, cell reference, or text that define which cells will be counted. For example, criteria can be expressed as 32, ">32", B4, "apples", or "32".
- criteria_range2rangeOptional
- criteria2anyRepeating
COUNTIFS examples
Formulas you'll actually reuse.
West deals over $1,000 — all conditions must hold:
=COUNTIFS(A2:A200, "West", C2:C200, ">1000")Result
22Orders dated in July 2026 — two conditions on the same column bound a range:
=COUNTIFS(D2:D200, ">=" & DATE(2026, 7, 1), D2:D200, "<" & DATE(2026, 8, 1))Result
31
COUNTIFS in Google Sheets
Same name — your formula ports as-is.
Try COUNTIFS in the playground
Edit the example — nothing to install.
Preloaded with the COUNTIFS formula from Example 1 — change anything and watch it respond.
Loading the editor…
Related functions
More ways Excel gets this done.
- AVERAGEIFReturns the average (arithmetic mean) of all the cells in a range that meet a given criteriaStatisticalGoogle Sheets
- COUNTBLANKCounts the number of blank cells within a rangeStatisticalGoogle Sheets
- COUNTIFCounts the number of cells within a range that meet the given criteriaStatisticalGoogle Sheets
- FORECAST.LINEARReturns a future value based on existing valuesStatisticalGoogle Sheets
- GAMMALNReturns the natural logarithm of the gamma function, Γ(x)StatisticalGoogle Sheets
- GAMMALN.PRECISEReturns the natural logarithm of the gamma function, Γ(x)StatisticalGoogle Sheets