COUNTIFS Function
Counts cells that meet all of the specified conditions.
Syntax
Parameters
| Parameter | Description | Required |
|---|---|---|
| criteria_range1 | The range to evaluate with the first criteria. | Required |
| criteria1 | The condition that criteria_range1 must satisfy. | Required |
| criteria_range2, criteria2 | Additional range/criteria pairs (optional). | Optional |
Basic Example
Count orders from the East region
=COUNTIFS(A2:A100, "East")Counts how many cells in A2:A100 contain "East".
Advanced Examples
Example 1: Multiple criteria
Orders by region and statusCount orders where region is East and status is Completed
=COUNTIFS(A2:A100, "East", B2:B100, "Completed")Example 2: Numeric range
Sales valuesCount sales between 1000 and 5000
=COUNTIFS(B2:B100, ">=1000", B2:B100, "<=5000")How COUNTIFS Works
COUNTIFS iterates through each cell in the criteria ranges. It counts a row only if every criterion is satisfied. Empty cells are ignored unless the criteria explicitly matches blank.
Important Notes & Limitations
All criteria ranges must be the same size and shape.
Criteria are combined with AND logic.
Counts cells, not numeric values; use SUMIFS for adding values.
Common Errors & Fixes
#VALUE! errorCriteria ranges have different sizes.Fix: Make all ranges the same dimensions.
Unexpected countCriteria includes hidden spaces or wrong data type.Fix: Use TRIM to clean text and check number formatting.
0 resultNo cells match all criteria.Fix: Verify criteria and values.
Download Practice File
COUNTIFS
countifsPractice COUNTIFS with Real Data
Download a sample CSV file with pre-populated data and practice exercises for the COUNTIFS function. Works in both Excel and Google Sheets.
File format: CSV (comma-separated values) - opens in Excel, Google Sheets, and all spreadsheet apps
Related Tutorials
COUNTIF with Wildcard: Count Cells by Text Pattern
COUNTIF with wildcard patterns counts cells by prefix, suffix or length. Learn the * and ? rules, how to escape a literal asterisk, and where numbers fail.
Excel Sales Dashboard: Build One That Updates Itself
Build an Excel sales dashboard that keeps itself current: one flat sales table, SUMIFS KPIs, XLOOKUP targets and FILTER drill-downs that grow with the data.
SUMIFS Multiple Criteria
Build SUMIFS multiple criteria formulas that total values matching two or more conditions in Excel and Google Sheets, including dates, wildcards and OR logic.