COUNTIFS Function in Excel: How to Count With Multiple Criteria
How to use the COUNTIFS function in Excel to count cells matching multiple criteria. Syntax, examples, and common mistakes to avoid.

What COUNTIFS Actually Does
COUNTIFS is the Excel function for counting cells that meet multiple conditions simultaneously. Where COUNTIF handles a single criterion (count cells greater than 100, for example), COUNTIFS handles two or more criteria at the same time (count cells greater than 100 and less than 500, or count cells in column A that match a region while column B values match a product category). The function appears constantly in business reporting because real-world questions almost always involve multiple filtering conditions rather than single-criterion counts. overall always.
Knowing COUNTIFS thoroughly puts you ahead of casual Excel users who get stuck building helper columns or pivot tables for problems COUNTIFS solves in one formula.
The function takes pairs of arguments: a range to evaluate followed by a criteria to check against that range. You can have up to 127 criteria pairs in a single COUNTIFS call, though most practical uses involve 2 to 5 criteria pairs.
All criteria must be true simultaneously for a row to be counted, which means COUNTIFS performs an AND operation across all the conditions you specify. There is no built-in OR equivalent within COUNTIFS, though you can construct OR logic by summing multiple COUNTIFS calls for different criteria sets. Our Excel cheat sheet covers similar functions you may find useful.
COUNTIFS was introduced in Excel 2007 as part of a family of multi-criteria functions that included SUMIFS and AVERAGEIFS. Before 2007, multi-criteria counting required complex array formulas using SUMPRODUCT or helper columns to combine multiple conditions into a single column that COUNTIF could then evaluate. The 2007 addition simplified what had been one of the more annoying aspects of Excel analysis. Today the function is universally available across all current Excel versions including Microsoft 365 subscriptions, Office 2019 and later standalone versions, and Excel for Mac.
Practicing COUNTIFS with sample datasets accelerates learning faster than reading about the syntax alone. Build a small spreadsheet with columns for category, region, and value, then write COUNTIFS formulas testing various criteria combinations. The hands-on experimentation reveals edge cases and clarifies syntax behavior that pure reading cannot teach. Most Excel learners build practical fluency through this kind of small-scale repeated practice rather than working only on real business problems where errors carry consequences.
Building strong COUNTIFS fluency pays off across decades of business analysis work since the function appears constantly across virtually every industry context where data analysis happens regularly.
Mastering COUNTIFS along with related multi-criteria functions opens efficient solutions across many business analysis problems.
COUNTIFS Quick Take
COUNTIFS counts cells matching multiple criteria simultaneously. Syntax: COUNTIFS(criteria_range_1, criteria_1, criteria_range_2, criteria_2, ...). All criteria must be true for a row to be counted (AND operation). Supports up to 127 criteria pairs in a single formula. The function appears constantly in business reporting because real questions almost always involve multiple filtering conditions rather than single criterion counts.
The COUNTIFS Syntax Explained
The function syntax follows a strict pattern: COUNTIFS(criteria_range_1, criteria_1, criteria_range_2, criteria_2, ...). Each criteria range must be the same size and shape as the others. If your first criteria range spans 100 rows in column A, your second criteria range must also span 100 rows in another column. Mismatched range sizes return a VALUE error rather than a valid count. This rule trips up many beginners who try to reference different-sized ranges within the same COUNTIFS call.
The criteria themselves accept several forms. Plain numbers and text strings work directly: COUNTIFS(A:A, 5) counts cells equal to 5. Comparison operators in quotes handle ranges: COUNTIFS(A:A, greater than 5) using actual greater-than syntax counts cells above 5. Cell references work too: COUNTIFS(A:A, B1) counts cells matching the value in B1. Wildcards like asterisk and question mark work for text matching: COUNTIFS(A:A, North asterisk) counts cells starting with North. Mastering these criteria forms unlocks the full range of COUNTIFS use cases that simpler implementations cannot handle effectively.
Spaces and capitalization in criteria text matter for exact-match comparisons. COUNTIFS(A:A, North) and COUNTIFS(A:A, north) typically return the same count because Excel performs case-insensitive matching by default. But COUNTIFS(A:A, North America) and COUNTIFS(A:A, North America with trailing space) return different counts if any cells contain trailing whitespace. Trimming source data with the TRIM function before counting eliminates these subtle whitespace issues that produce confusing inconsistencies in COUNTIFS results across what should be identical cells.
Documentation habits also matter for COUNTIFS-heavy workbooks. Adding cell notes that explain what each COUNTIFS formula is calculating helps future maintainers and your future self understand the logic without reverse-engineering each formula. Excel name ranges further improve readability by replacing cryptic cell references with meaningful labels. A formula reading COUNTIFS(SalesRegion, North, ProductLine, Alpha) is much easier to understand than COUNTIFS(A2:A10000, North, B2:B10000, Alpha) even though both produce identical results.

Common COUNTIFS Criteria Types
Plain number or text in quotes. Counts cells equal to that exact value. Used for category counts, status counts, and identifier matching across datasets. Practice with sample data to build muscle memory for each pattern type.
Operators in quotes like greater than 5, less than or equal to 100, not equal to 0. Used for numerical range filtering and conditional analysis. Practice with sample data to build muscle memory for each pattern type.
Reference another cell containing the criteria value. Allows dynamic formulas that update when the referenced cell changes. Standard pattern for reusable dashboards. Practice with sample data to build muscle memory for each pattern type.
Asterisk for any characters or question mark for single character. Powerful for partial text matching across name fields, category labels, and free-form data. Practice with sample data to build muscle memory for each pattern type.
Practical COUNTIFS Examples
Consider a sales dataset with columns for Region (column A), Product (column B), and Sale Amount (column C). To count sales in the North region of Product Alpha worth more than 1000 dollars, use COUNTIFS(A:A, North, B:B, Alpha, C:C, greater than 1000). The function returns the count of rows meeting all three criteria simultaneously. Each criteria pair narrows the count further. Three criteria pairs identify a precise subset that single COUNTIF calls cannot match without complex helper column workarounds.
Another common use is date-range counting. To count orders placed in March 2026, use COUNTIFS(A:A, greater than or equal to 3/1/2026, A:A, less than 4/1/2026) where column A contains order dates. Note that the same column appears twice with different criteria, which is perfectly valid in COUNTIFS. The two date criteria together define the inclusive March 2026 range. This pattern works for any date or numeric range counting where you need both a lower and upper bound to filter the dataset to the relevant subset.
For dashboards where you want to count high-value orders in a specific region, the formula pattern stays consistent regardless of business specifics. The general structure is COUNTIFS plus paired criteria ranges and criteria values. Substitute your specific column references and criteria values for the relevant business question. The pattern transfers across HR, finance, operations, sales, and marketing use cases because the underlying logic of multi-criteria counting applies broadly to any quantitative business analysis question.
COUNTIFS Use Case Examples
Count sales in a specific region for a specific product. COUNTIFS lets you create a matrix where rows are regions and columns are products, with each cell containing the COUNTIFS result for that intersection. Cleaner than pivot tables when you need formula-based dynamic counts that update automatically as data changes. Apply this pattern across your specific data structure to handle similar multi-criteria counting requirements that recur across business analysis work.
COUNTIFS Versus COUNTIF and SUMIFS
COUNTIFS is the multi-criteria sibling of COUNTIF. COUNTIF handles single criterion counting and is functionally a subset of COUNTIFS. Any COUNTIF formula can be rewritten as COUNTIFS with one criteria pair. Most experienced Excel users default to COUNTIFS even for single-criterion problems because the syntax is consistent and the formula stays compatible if you add criteria later. The performance difference is negligible for typical use cases.
SUMIFS is the corresponding function for summing values rather than counting cells. The syntax mirrors COUNTIFS except for the additional sum_range argument at the start: SUMIFS(sum_range, criteria_range_1, criteria_1, ...). Use SUMIFS when you want totals of values rather than counts of rows matching the criteria. Together COUNTIFS and SUMIFS handle most aggregation work that comes up in business reporting. AVERAGEIFS works similarly for averages. MAXIFS and MINIFS handle max and min within filtered subsets. All of these multi-criteria aggregation functions follow the same general pattern. Our COUNTIF function guide covers single-criterion counting in detail.
The IFS family of functions also includes IFS itself, which lets you nest multiple IF conditions cleanly in one formula. While IFS is not directly related to COUNTIFS in terms of multi-criteria counting, learning the full family of IFS functions together provides a coherent toolkit for conditional logic across counting, summing, averaging, max, min, and value selection. Master one of these functions and the syntax patterns transfer easily to the others because they all share the criteria-pair structure.

All criteria_range arguments in COUNTIFS must reference ranges of the same size and shape. Mismatched range sizes return a VALUE error. The function does not work like array formulas in some other tools where ranges automatically align. Plan your data structure to keep related criteria columns aligned in the same row layout. The mismatched range error catches many beginners and even experienced users when copying COUNTIFS formulas across workbooks with different data layouts and structures.
Common COUNTIFS Mistakes
The most common mistake is forgetting that text criteria must be enclosed in quotes when typed directly into the formula. COUNTIFS(A:A, North) works because Excel sometimes interprets bare text as criteria, but the safer pattern is COUNTIFS(A:A, quoted North in quotes). Numeric criteria do not need quotes when used directly but always need quotes when paired with comparison operators. COUNTIFS(A:A, greater than 5) requires the comparison operator and number wrapped together in quotes as a string, not separated.
Another common mistake is using full column references like A:A when smaller ranges would suffice. Full column references force Excel to evaluate every cell in the column, including empty ones, which slows calculations significantly on large workbooks. Use specific ranges like A2:A1000 when you know your data does not extend beyond those rows. The performance difference is dramatic for COUNTIFS formulas used in large numbers across complex dashboards or reports. Modern Excel handles smaller ranges much faster than full-column references, even though both produce the same answer when data is sparse.
Cell formatting issues sometimes cause unexpected COUNTIFS results. Numbers stored as text look identical to actual numbers in cells but do not match numeric criteria. The cell looks like 100 but is actually the text 100, which fails to match COUNTIFS(A:A, 100) even though it visually appears to match. Use VALUE function or paste-special multiplication by 1 to convert text-numbers to actual numbers before running COUNTIFS calculations on suspect data. Data imported from external systems often has this issue and silently produces wrong COUNTIFS results.
COUNTIFS Mastery Checklist
- ✓Understand the criteria pair structure (range followed by criterion) (verify each step with a small sample dataset)
- ✓Verify all criteria ranges are identical in size and shape (verify each step with a small sample dataset)
- ✓Practice with exact match criteria for text and numbers (verify each step with a small sample dataset)
- ✓Use comparison operators in quotes for numeric ranges (verify each step with a small sample dataset)
- ✓Apply wildcards (asterisk and question mark) for text pattern matching (verify each step with a small sample dataset)
- ✓Use cell references for dynamic criteria that update with cell changes (verify each step with a small sample dataset)
- ✓Combine same-range references for between-condition filtering (verify each step with a small sample dataset)
- ✓Avoid full-column references when smaller ranges work as well (verify each step with a small sample dataset)
Combining COUNTIFS With Other Functions
COUNTIFS produces a single number result, which makes it composable with other Excel functions. SUM(COUNTIFS(A:A, value1) plus COUNTIFS(A:A, value2)) creates an OR condition by adding the counts of two separate COUNTIFS calls. IF(COUNTIFS(...) greater than 0, found, not found) checks whether matching records exist. Dividing COUNTIFS results by COUNTA totals gives percentages of matching records relative to overall datasets. These combinations turn COUNTIFS into a building block for more sophisticated analytical logic.
COUNTIFS works particularly well within IFERROR wrappers to handle cases where criteria might not match any records. IFERROR(COUNTIFS(...), 0) returns 0 instead of an error when criteria find nothing. The wrapper improves dashboard appearance and downstream calculations that depend on numeric results. SUMPRODUCT alternatives exist for some COUNTIFS scenarios but tend to be more complex syntactically. COUNTIFS is usually the cleaner choice when the use case fits its AND-logic structure. Reserve SUMPRODUCT for situations requiring more complex array logic that COUNTIFS cannot handle directly.
Excel 365 dynamic array formulas have introduced new ways to handle multi-criteria filtering. The FILTER function returns full rows matching criteria, and ROWS counts the returned set. This combination provides COUNTIFS-equivalent functionality with more flexibility for downstream analysis. The trade-off is that FILTER requires Excel 365 or later, while COUNTIFS works in older versions back to Excel 2007. For maximum compatibility across organizations with mixed Excel version installations, COUNTIFS remains the safer choice for routine multi-criteria counting.
Performance Considerations
COUNTIFS scales reasonably well to large datasets, but performance degrades when used heavily across very large workbooks. A workbook with hundreds of COUNTIFS formulas each operating on tens of thousands of rows can slow to a crawl. Two main mitigations help. First, use specific ranges (A2:A10000) instead of full column references (A:A) to limit the cells Excel must evaluate. Second, consider using pivot tables or Power Query for very large repetitive aggregations because those tools are optimized for bulk analysis in ways that formula-based approaches cannot match.
For dashboards with many COUNTIFS calls referencing the same dataset, calculation chains can produce noticeable lag during data refreshes. The lag is most apparent on older hardware or when Excel runs alongside other memory-intensive applications. Restructuring the dataset to use indexed columns (with pre-calculated category flags) sometimes improves performance by simplifying the criteria evaluations. The trade-off is more setup work upfront in exchange for faster recurring use. For one-time analysis, the upfront cost rarely pays off, but recurring dashboards benefit substantially from this kind of optimization.
Calculation modes also affect COUNTIFS performance perception. Excel defaults to automatic recalculation, which means every formula recalculates whenever any cell changes. For workbooks with many COUNTIFS formulas, this can produce noticeable lag during data entry. Switching to manual calculation mode lets you control when recalculations happen, which improves data entry experience. Use Shift-F9 to recalculate the active sheet or F9 to recalculate the entire workbook when ready. Most production dashboards work well with manual calculation enabled during heavy editing sessions.

COUNTIFS By the Numbers
Three COUNTIFS Operator Patterns
Direct value comparison. COUNTIFS(A:A, value) counts cells exactly equal to value. Most common pattern for category and status counting. Practice with sample data to build muscle memory for each pattern type.
Greater than, less than, not equal operators wrapped in quotes with the comparison value. Powers numeric and date range filtering across datasets. Practice with sample data to build muscle memory for each pattern type.
Asterisk matches any number of characters, question mark matches exactly one character. Used for partial text matching and pattern recognition. Practice with sample data to build muscle memory for each pattern type.
Real-World COUNTIFS Scenarios
HR teams use COUNTIFS extensively to track headcount across multiple dimensions. Count active employees in a specific department, location, and job level. The combination produces granular headcount metrics that single-criterion counts cannot match. Sales operations teams use COUNTIFS for pipeline analysis, counting opportunities by stage, region, and product line simultaneously. Customer success teams count contracts by tier, renewal status, and contract value range. The applications appear everywhere that business analysis requires filtering data across multiple dimensions before counting.
Finance teams use COUNTIFS in budget variance analysis, counting line items where actual spend exceeds budgeted amounts by specific thresholds. The criteria can combine multiple comparison operations against different columns in the same dataset. COUNTIFS results then feed into broader variance reports that highlight the most problematic spending categories. Audit teams similarly use COUNTIFS to identify transactions matching specific risk criteria across multiple data fields simultaneously, which speeds initial flagging work that would otherwise require manual review of large transaction lists.
Educational settings also use COUNTIFS extensively. Teachers count students achieving specific grade thresholds across multiple assignments. Administrators count students enrolled in specific course combinations for capacity planning. Research analysts count survey responses meeting specific demographic and answer combinations. The applications span every domain where data analysis requires filtering by multiple criteria before counting. Building strong COUNTIFS habits transfers across all these contexts because the underlying syntax and logic remain stable regardless of the specific data being analyzed.
Pros and Cons of COUNTIFS
- +Handles up to 127 criteria pairs in a single formula for business analysis and reporting workflows
- +Cleaner syntax than nested IF or helper columns for multi-criteria counting for business analysis and reporting workflows
- +Available since Excel 2007 in nearly all current Excel installations for business analysis and reporting workflows
- +Composable with other functions for more complex logic for business analysis and reporting workflows
- +Performance acceptable for most business reporting use cases for business analysis and reporting workflows
- −AND logic only — no built-in OR within a single COUNTIFS call worth understanding when designing formulas
- −Range size mismatches return errors rather than partial results worth understanding when designing formulas
- −Slows on very large datasets with hundreds of COUNTIFS formulas worth understanding when designing formulas
- −Wildcards work for text but not for numeric ranges directly worth understanding when designing formulas
- −Older Excel 2003 and earlier do not have the function available worth understanding when designing formulas
Excel Questions and Answers
About the Author
Attorney & Bar Exam Preparation Specialist
Yale Law SchoolJames R. Hargrove is a practicing attorney and legal educator with a Juris Doctor from Yale Law School and an LLM in Constitutional Law. With over a decade of experience coaching bar exam candidates across multiple jurisdictions, he specializes in MBE strategy, state-specific essay preparation, and multistate performance test techniques.