range - Required. The range of cells to evaluate (e.g., A1:A100, B:B). Can be a single column or multiple columns.
criteria - Required. The condition that determines which cells to count (e.g., "East", ">90", "A*", TODAY()). Can be number, text, date, or comparison.
| A | B | C | |
|---|---|---|---|
| 1 | Region | Sales | Count East |
| 2 | East | 1200 | |
| 3 | West | 950 | |
| 4 | East | 1500 | |
| 5 | East | 800 | |
| 6 | North | 1100 | |
| 7 | =COUNTIF(A2:A6, "East") 3 |
Counts how many cells contain "East" (case-insensitive)
=COUNTIF(A:A, "East") → 15
Counts cells with values greater than 90
=COUNTIF(B2:B50, ">90") → 8
Counts cells starting with "A" (* = any characters)
=COUNTIF(A:A, "A*") → 12
Counts cells that don't contain "Pending"
=COUNTIF(C2:C100, "<>Pending") → 67
Tally how many sales transactions occurred in each region using conditional counting. Track regional performance, identify top markets, analyze geographic distribution patterns across multiple territories and time periods. This formula is essential for sales managers, regional directors, and business analysts who need territory analysis and market penetration metrics for strategic planning and resource allocation. Use it for any categorization scenario: count by department, product type, customer segment, status code, priority level, or any custom classification across your entire dataset for comprehensive business intelligence reporting and executive dashboards.
| A | B | C | |
|---|---|---|---|
| 1 | Transaction | Region | East Count |
| 2 | 1 | East | |
| 3 | 2 | West | |
| 4 | 3 | East | |
| 5 | 4 | East | |
| 6 | 5 | North | |
| 7 | Result: | =COUNTIF(B2:B6, "East") 3 |
Use comparison operators with conditional counting to determine how many students scored above a specific threshold in exams or assignments. Calculate pass rates, identify top performers, track achievement distributions across entire classrooms, grade levels, or school districts. This formula handles numeric comparisons perfectly - essential for teachers, academic advisors, and education administrators building grade reports, performance dashboards, and academic tracking systems that need automatic counting based on score criteria for institutional reporting, student assessment analysis, accreditation documentation, and educational outcome measurements.
| A | B | C | |
|---|---|---|---|
| 1 | Student | Score | A Count (≥90) |
| 2 | Alice | 95 | |
| 3 | Bob | 78 | |
| 4 | Carol | 92 | |
| 5 | David | 88 | |
| 6 | Emma | 91 | |
| 7 | Result: | =COUNTIF(B2:B6, ">=90") 3 |
❌ The Problem:
✅ Solution:
=COUNTIF(A:A, "Complete")Use quotes around literal text criteria: "East", "Approved", "Complete". This function treats criteria without quotes as cell references or numbers by default. If you want to match specific text strings exactly, always use double quotes around the text for clarity and proper formula execution. This distinction is crucial for preventing errors and ensuring your counting logic works as expected.
❌ The Problem:
✅ Solution:
=COUNTIF(A1:A10, ">=90")Always wrap comparison operators in quotes: ">=90", "<100", "<>0", "<=50". This formula requires criteria to be text strings, even for numeric comparisons and mathematical operations. This syntax allows the function to properly parse and apply the conditional logic correctly. Without quotes, you'll get a syntax error and the formula won't work at all.
❌ The Problem:
✅ Solution:
=SUMPRODUCT(--(EXACT(A:A, "east")))For case-sensitive counting, use SUMPRODUCT with EXACT function instead of standard conditional counting methods. The default function treats "East" and "east" as identical by design. EXACT performs case-sensitive comparison for precise matching and text differentiation. This pattern is essential when case matters in your data classification or coding systems where upper and lowercase letters have different meanings and must be distinguished for accurate results.
Master these COUNTIF variants:
From basics to advanced - AI generates perfect formulas instantly.