Statistical Functions
2.9K monthly searches
Intermediate
5 min read

COUNTIFS Function in Excel - Count with Multiple Criteria & Conditions

Count cells when multiple conditions are ALL true simultaneously with the COUNTIFS function in Excel....

Quick Start

Syntax

=COUNTIFS(criteria_range1, criterion1, [criteria_range2, criterion2], ...)

Parameters

criteria_range1 - Required. First range to evaluate (e.g., A:A, B2:B100). All criteria ranges must have same dimensions.

criterion1 - Required. Condition for first range (e.g., "East", ">100", "*Pro*", ">=2023-01-01").

criteria_range2, criterion2 - Optional. Optional. Additional range/criteria pairs. Up to 127 conditions supported.

Simplest Example

ABCD
1Order IDRegionQuarterCount
2ORD-001EastQ1
3ORD-002WestQ1
4ORD-003EastQ2
5ORD-004EastQ1
6ORD-005EastQ1
8East Region Q1:
=COUNTIFS(B:B, "East", C:C, "Q1")
3

Quick Reference

Basic COUNTIFS (2 Criteria)
=COUNTIFS(A:A, "East", B:B, "Q1")

Count rows where A="East" AND B="Q1"

Returns count of matching rows

COUNTIFS with Comparisons
=COUNTIFS(B:B, ">=100", C:C, "<1000")

Count where B≥100 AND C<1000

Numeric range filtering

COUNTIFS with Wildcards
=COUNTIFS(A:A, "*Pro*", D:D, "Active")

Count where A contains "Pro" AND D="Active"

Text pattern + exact match

COUNTIF vs COUNTIFS
COUNTIF: 1 condition | COUNTIFS: Multiple AND conditions

COUNTIF for single criteria, COUNTIFS for multi-criteria

Use COUNTIFS for complex filtering

Real-World Examples

Count Sales Transactions by Region AND Quarter

Analyze transaction volume by combining geographic and time filters with the COUNTIFS function in Excel. It enables multi-dimensional counting impossible with single-criteria functions. Essential for sales managers analyzing regional performance across quarters, finance teams tracking transaction patterns, operations teams monitoring order volumes by location and period. The COUNTIFS function handles this two-way segmentation perfectly - count how many orders came from specific regions during specific quarters for accurate trend analysis and resource planning.

ABCD
1Order IDRegionQuarterAmount
2ORD-001EastQ1$25,000
3ORD-002WestQ1$32,000
4ORD-003EastQ2$28,000
5ORD-004EastQ1$18,000
6ORD-005WestQ2$41,000
7ORD-006EastQ1$22,000
8East Q1 Count:
=COUNTIFS(B:B, "East", C:C, "Q1")
3
Pro Tip: Use COUNTIFS with date ranges: =COUNTIFS(A:A, ">=2024-01-01", A:A, "<=2024-03-31") for quarter filtering
Pattern: =COUNTIFS(range1, criteria1, range2, criteria2) for multi-dimensional analysis
Employee Count by Department AND Salary Range

Count employees meeting multiple criteria simultaneously with this powerful Excel function. HR teams use it to analyze workforce composition by department and compensation level, identify staffing gaps, plan promotions, and budget for raises. The function handles numeric ranges perfectly - count how many employees in Marketing earn between $50K and $75K, or how many Senior Developers have salaries above $100K. This multi-criteria counting is essential for workforce planning, compensation analysis, and DEI reporting.

ABC
1EmployeeDepartmentSalary
2AliceMarketing$65,000
3BobSales$82,000
4CarolMarketing$58,000
5DaveEngineering$95,000
6Marketing $50K-$70K:
=COUNTIFS(B:B, "Marketing", C:C, ">=50000", C:C, "<=70000")
2
Pattern: =COUNTIFS(dept_range, "dept", salary_range, ">=min", salary_range, "<=max")

Common Mistakes to Avoid

=COUNTIF(A:A, "East") + COUNTIF(C:C, "Q1")Adding separate COUNTIF results instead of using COUNTIFS

❌ The Problem:

  • Counts rows separately, not rows meeting BOTH criteria
  • Results in incorrect totals (double-counting)
  • Misses the AND logic requirement
  • Confuses count of "East" + count of "Q1" with count of "East AND Q1"

✅ Solution:

=COUNTIFS(A:A, "East", C:C, "Q1")

Use this multi-criteria function in Excel to count rows where ALL conditions are true simultaneously. It applies AND logic across all criteria pairs, ensuring each row is counted only if it matches every condition. This is fundamentally different from adding separate COUNTIF results.

=COUNTIFS(A:A, "East", B:B)Missing the criterion for a criteria range

❌ The Problem:

  • Incomplete formula causes #VALUE! error
  • Every criteria_range needs a matching criterion
  • Ranges and criteria must come in pairs
  • Excel cannot evaluate a range without knowing what to check

✅ Solution:

=COUNTIFS(A:A, "East", B:B, "Q1")

This function in Excel requires criteria_range and criterion pairs. Always provide both the range to evaluate AND the condition to test. Format: COUNTIFS(range1, criteria1, range2, criteria2, ...) where each range has a matching criterion.

=COUNTIFS(A1:A10, "East", B1:B20, "Q1")Using criteria ranges with different dimensions

❌ The Problem:

  • All criteria ranges must have the same number of rows/columns
  • Mismatched dimensions cause #VALUE! error
  • Excel cannot align rows when ranges differ in size
  • Common when copying formulas from different sections

✅ Solution:

=COUNTIFS(A1:A10, "East", B1:B10, "Q1")

Ensure all criteria ranges in this formula have identical dimensions. If checking rows 1-10 in column A, also check rows 1-10 in column B. The function evaluates each row across all ranges, so they must align perfectly for accurate results.

Frequently Asked Questions

Other Statistical Functions Functions

Related Formulas

Master these COUNTIFS variants:

Master Excel COUNTIFS

From basics to advanced - AI generates perfect formulas instantly.