ExcelStatisticalIntermediate

COUNTIFS

Counts cells that meet multiple criteria.

Read the syntaxReview worked examplesOpen the spreadsheet app
=COUNTIFS(criteria_range1, criteria1, [criteria_range2, criteria2], ...)

This static page keeps the function indexed for search, while the spreadsheet app handles interactive exploration and saved formulas.

What the function does

Overview

Counts cells that meet multiple criteria.

The COUNTIFS function is the primary tool for performing multi-criteria frequency analysis across datasets. Unlike the standard COUNTIF, this function evaluates multiple ranges and criteria simultaneously, returning a count only where all conditions evaluate to TRUE (AND logic). A critical technical requirement is that every ange must be of identical shape and size; mismatched dimensions will trigger a #VALUE! error. The function supports wildcards—an asterisk (*) for strings of any length and a question mark (?) for single characters—making it effective for partial text matching. For optimal spreadsheet design, criteria involving logical operators should be concatenated with cell references (e.g., ">"&F1) to allow for dynamic updates without editing formulas. It is worth noting that while COUNTIFS is highly efficient, it cannot natively handle array-based logic like OR conditions across the same range without being wrapped in a SUM function, and it treats values in ranges as specific data types (text vs. numbers) which must match the criteria format.

Quick reference

Syntax

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

Inputs

Arguments

criteria_range1Range for first condition
Example: A2:A100
criteria1First condition
Example: "Complete"
criteria_range2 (optional)Range for second condition
Example: B2:B100
Pattern: Criteria Pair

Formula patterns

Examples

1

Count records based on text and numeric thresholds

=COUNTIFS(A2:A20, "Completed", B2:B20, ">100")
project managementcomparison
2

Count occurrences within a specific date range

=COUNTIFS(C2:C50, ">="&F1, C2:C50, "<="&F2)
datesrange analysis
3

Partial text matching with non-blank verification

=COUNTIFS(D2:D100, "*West*", E2:E100, "<>")
wildcardsdata cleanup

Avoid these issues

Common Errors

1

#VALUE!

Cause: This error occurs when the criteria_range arguments do not have the same number of rows or columns.

Fix: Ensure that all range arguments (e.g., A2:A10, B2:B10) cover the exact same number of rows and columns.

2

Incorrect Operator Syntax

Cause: When referencing a cell for a criterion (like a date or number), users often place the logical operator inside quotes with the cell reference or fail to use the ampersand (&) for concatenation.

Fix: Use the syntax ">"&A1 instead of ">A1" to correctly combine the comparison operator with the value in cell A1.

Platform support

Compatibility

Excel 2007+Excel-first

Source: Microsoft Support

Common questions

Frequently Asked Questions

Counts cells that meet multiple criteria.

ange1: Range for first condition criteria1: First condition ange2: Range for second condition

#VALUE!: Ensure that all range arguments (e.g., A2:A10, B2:B10) cover the exact same number of rows and columns. Incorrect Operator Syntax: Use the syntax ">"&A1 instead of ">A1" to correctly combine the comparison operator with the value in cell A1.