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.



=COUNTIFS(criteria_range1, criteria1, [criteria_range2, criteria2]...)
Real-World Examples
Sales Performance Analysis
Count sales transactions over $5,000 in Q4 2024 for the Eastern region
Employee Performance Metrics
Identify high-performing senior employees eligible for promotion
Inventory Management Filtering
Count products needing reorder: stock below 50 units AND high demand category
Academic Performance Tracking
Count students passing with distinction: Grade >= 85% AND Attendance > 90%
Financial Transaction Audit
Flag suspicious transactions: Amount > $10,000 AND Type = 'Wire' AND Country not 'USA'
Common Errors and Solutions
COUNTIFS returns #VALUE! error
Criteria ranges have different sizes. All ranges must have exactly the same dimensions.
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)
Always select ranges with the same starting and ending rows. Use Table references for automatic alignment.
Example:
Excel doesn't recognize the function name
COUNTIFS is not available in Excel versions prior to 2007, or there's a typo in the function name.
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))
Ensure compatibility with user's Excel version. Document minimum requirements.
Example:
Formula returns 0 when matches should exist
Common causes include hidden spaces in text, date format mismatches, or incorrect wildcard usage.
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
Clean data with TRIM and CLEAN functions. Standardize date formats across datasets.
Example:
Date criteria not working as expected
Excel may interpret date criteria as text strings rather than date values.
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
Store dates in cells and reference them, or use DATE function for clarity.
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.
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
Master the COUNTIF function to count cells that meet specific criteria. Learn syntax, practical examples, and error solutions for data analysis.

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

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