COUNTIFS Function Guide

Master COUNTIFS to count cells with multiple criteria. Learn syntax, see real examples, and solve errors for powerful multi-condition data analysis.

ExcelExcel
Google SheetsGoogle Sheets
statistical
intermediate
Syntax PreviewExcelExcel
=COUNTIFS(criteria_range1, criteria1, [criteria_range2, criteria2]...)
Quick Answer
Comprehensive Explanation
How to Use COUNTIFS - Step by Step

Real-World Examples

Sales Performance Analysis

Count sales transactions over $5,000 in Q4 2024 for the Eastern region

Result: 47

Employee Performance Metrics

Identify high-performing senior employees eligible for promotion

Result: 23

Inventory Management Filtering

Count products needing reorder: stock below 50 units AND high demand category

Result: 18

Academic Performance Tracking

Count students passing with distinction: Grade >= 85% AND Attendance > 90%

Result: 31

Financial Transaction Audit

Flag suspicious transactions: Amount > $10,000 AND Type = 'Wire' AND Country not 'USA'

Result: 8

Common Errors and Solutions

#VALUE!

COUNTIFS returns #VALUE! error

Cause:

Criteria ranges have different sizes. All ranges must have exactly the same dimensions.

Solution:

1. Check that all ranges have the same number of rows and columns 2. Ensure ranges align properly (B2:B100 with C2:C100, not C3:C101) 3. Use Name Manager to define consistent named ranges 4. Avoid mixing full column references (A:A) with specific ranges (B2:B100)

Prevention:

Always select ranges with the same starting and ending rows. Use Table references for automatic alignment.

Frequency: 40%

Example:

#NAME?

Excel doesn't recognize the function name

Cause:

COUNTIFS is not available in Excel versions prior to 2007, or there's a typo in the function name.

Solution:

1. Verify Excel version (must be 2007 or later) 2. Check spelling: COUNTIFS not COUNTIF or COUNTSIF 3. For older Excel versions, use SUMPRODUCT as alternative: =SUMPRODUCT((range1=criteria1)*(range2=criteria2))

Prevention:

Ensure compatibility with user's Excel version. Document minimum requirements.

Frequency: 15%

Example:

Zero Results Unexpected

Formula returns 0 when matches should exist

Cause:

Common causes include hidden spaces in text, date format mismatches, or incorrect wildcard usage.

Solution:

1. Use TRIM to remove extra spaces: COUNTIFS(A:A, TRIM(criteria)) 2. Ensure dates are in date format, not text 3. Check wildcard placement: '*text*' for contains, 'text*' for starts with 4. Verify criteria spelling and case (though COUNTIFS is case-insensitive) 5. Test each criteria pair individually to isolate the problem

Prevention:

Clean data with TRIM and CLEAN functions. Standardize date formats across datasets.

Frequency: 25%

Example:

Incorrect Date Filtering

Date criteria not working as expected

Cause:

Excel may interpret date criteria as text strings rather than date values.

Solution:

1. Use DATE function: COUNTIFS(A:A, ">"&DATE(2025,1,1)) 2. Reference a cell with date: COUNTIFS(A:A, ">"&E1) 3. Use numerical date values: COUNTIFS(A:A, ">45292") 4. Ensure date column is formatted as Date, not Text

Prevention:

Store dates in cells and reference them, or use DATE function for clarity.

Frequency: 20%

Example:

Advanced Tips and Best Practices

Create rolling date windows using TODAY() function. For last 30 days: COUNTIFS(A:A, ">="&TODAY()-30, A:A, "<="&TODAY()). This updates automatically each day without manual formula changes.

Use wildcards strategically: asterisk (*) for any characters, question mark (?) for single character. Combine for powerful patterns: 'A?C*' matches 'ABC Company' but not 'AC Corp'.

For datasets over 100,000 rows, avoid full column references (A:A). Use specific ranges (A2:A100000) or Excel Tables for better performance. Full column references force Excel to check 1,048,576 rows.

COUNTIFS uses AND logic between criteria. For OR logic, sum multiple COUNTIFS: =COUNTIFS(A:A,"Apple")+COUNTIFS(A:A,"Orange") counts rows with Apple OR Orange.

Make formulas flexible by referencing cells for criteria instead of hard-coding. This enables dashboard creation where users can change criteria without editing formulas.

COUNTIFS vs Alternative Functions
Practical Use Cases by Industry
Frequently Asked Questions

Need Help with COUNTIFS Function Guide?

Stop struggling with formula syntax. Use AskFormulas to generate validated formulas instantly with our AI-powered tool.

Example Excel formula:

Related Formulas

COUNTIF Function Guide

Master the COUNTIF function to count cells that meet specific criteria. Learn syntax, practical examples, and error solutions for data analysis.

intermediate
statistical
ExcelExcel
Validated
SUMIFS Function

Master SUMIFS to sum cells meeting multiple criteria. Learn conditional summation with practical examples and error solutions in Excel & Google Sheets.

intermediate
math
ExcelExcel
Validated
AVERAGE Function Guide

Master the AVERAGE function with practical examples and error solutions. Learn to calculate mean values and analyze data efficiently in Excel and Sheets.

beginner
statistical
ExcelExcel
Validated