When you work with spreadsheets, one of the most common questions you’ll ask is simple: How many times does something appear? Whether you’re tracking sales, attendance, survey responses, task statuses, or inventory, counting values based on conditions is a core skill. That’s exactly where COUNTIF and COUNTIFS come in.
COUNTIF and COUNTIFS are two of the most useful functions in Excel and Google Sheets for analyzing data quickly without complex formulas or pivot tables. While they’re easy to start using, many users struggle with knowing when to use each function, how to structure criteria correctly, and how to avoid common mistakes that lead to incorrect counts.
In this guide, you’ll learn how COUNTIF and COUNTIFS work, how they differ, and how to use them confidently in real-world spreadsheets. The explanations apply to both Excel and Google Sheets unless noted otherwise, making this a practical reference no matter which platform you use.
What Are COUNTIF and COUNTIFS Used For?

COUNTIF and COUNTIFS are conditional counting functions. They count the number of cells that meet specific criteria rather than simply counting all values in a range.
At a high level, these functions help you answer questions like:
- How many sales were greater than $1,000?
- How many tasks are marked “Completed”?
- How many customers are from a specific region?
- How many rows meet multiple conditions at once?
COUNTIF handles one condition, while COUNTIFS handles multiple conditions. Understanding this distinction early makes it much easier to choose the right function and avoid overcomplicating your formulas.
How Does the COUNTIF Function Work?
COUNTIF counts the number of cells in a range that meet a single criterion. It’s ideal when your logic is straightforward and based on one condition only.
You’ll typically use COUNTIF when:
- You’re counting a specific word or label
- You’re counting numbers above or below a threshold
- You’re checking for blanks or non-blanks
- You don’t need to combine multiple criteria
COUNTIF evaluates each cell in the specified range independently and increments the count when the condition is met. It does not care about values in other columns or rows unless they’re part of the same range.
COUNTIF Formula Structure
COUNTIF has a simple structure with two arguments:
- The range you want to evaluate
- The condition that must be met
The key thing to understand is that the criterion can be text, a number, a logical expression, or a reference to another cell. How you format that criterion determines whether your count works correctly.
COUNTIF Formula Examples
=COUNTIF(A2:A20,"Completed")Counts how many cells in A2:A20 contain the word “Completed”.
=COUNTIF(B2:B20,">=1000")Counts how many values in B2:B20 are greater than or equal to 1,000.
=COUNTIF(C2:C20,"<>")Counts non-blank cells in C2:C20.
=COUNTIF(D2:D20,""&F1)Counts cells in D2:D20 that match the value in cell F1.
These examples work the same way in Excel and Google Sheets.
When Should You Use COUNTIFS Instead of COUNTIF?
COUNTIFS is designed for situations where one condition isn’t enough. It allows you to count rows that meet two or more criteria at the same time, even when those criteria apply to different columns.
You should use COUNTIFS when:
- You need to filter by multiple columns
- You want all conditions to be true simultaneously
- You’re analyzing structured data like tables or logs
COUNTIFS evaluates conditions row by row. A row is only counted if every criterion is satisfied.
How Does the COUNTIFS Function Work?
COUNTIFS expands on COUNTIF by pairing ranges and criteria together. Each range corresponds to a condition, and all ranges must be the same size.
This design makes COUNTIFS extremely powerful for real-world data analysis, such as counting sales by region and product type, or tracking attendance by date and status.
COUNTIFS Formula Structure
COUNTIFS uses repeating pairs of arguments:
- Criteria range
- Criteria
You can include as many range-criteria pairs as needed, as long as they align correctly.
COUNTIFS Formula Examples
=COUNTIFS(A2:A20,"Completed",B2:B20,"High")Counts rows where column A is “Completed” and column B is “High”.
=COUNTIFS(C2:C20,">=1/1/2025",C2:C20,"<=12/31/2025")Counts dates in 2025.
=COUNTIFS(D2:D20,"West",E2:E20,">1000")Counts sales over 1,000 in the West region.
These formulas behave identically in Excel and Google Sheets, making COUNTIFS a reliable cross-platform tool.
What Are the Key Differences Between COUNTIF and COUNTIFS?
While COUNTIF and COUNTIFS are closely related, choosing the wrong one can limit your analysis or force unnecessary workarounds.
The most important differences are:
- COUNTIF supports only one condition
- COUNTIFS supports multiple conditions
- COUNTIFS evaluates conditions across multiple columns
- COUNTIFS requires all ranges to be the same size
If you ever find yourself trying to “stack” COUNTIF formulas together or subtract counts to simulate multiple conditions, it’s usually a sign that COUNTIFS is the better choice.
How Do COUNTIF and COUNTIFS Handle Text, Numbers, and Dates?
Both functions work consistently across data types, but small formatting issues can cause unexpected results.
For text criteria:
- Text values must be enclosed in quotes
- Criteria are not case-sensitive
- Extra spaces can affect matching
For numbers:
- Comparison operators like >, <, >=, and <= must be in quotes
- You can combine operators with cell references
For dates:
- Dates are treated as numeric values behind the scenes
- Using comparison operators is often more reliable than exact matches
- Date formatting differences between Excel and Sheets rarely affect COUNTIFS logic
Understanding how criteria are evaluated helps you write formulas that behave predictably even as your data grows.
What Are Common COUNTIF and COUNTIFS Mistakes to Avoid?
Many COUNTIF and COUNTIFS errors come from small syntax issues rather than flawed logic.
Common mistakes include:
- Forgetting quotation marks around criteria
- Using mismatched range sizes in COUNTIFS
- Trying to use wildcards incorrectly
- Counting numbers stored as text
- Assuming COUNTIF can handle multiple conditions
If a formula returns zero when you expect a result, double-check the criteria formatting first. Most issues are resolved by correcting how conditions are written.
How Do Wildcards Work in COUNTIF and COUNTIFS?
Wildcards allow you to match partial text instead of exact values. This is especially useful when working with inconsistent labels or longer text strings.
The most commonly used wildcards are:
*matches any number of characters?matches a single character
Wildcard Formula Examples
=COUNTIF(A2:A20,"*error*")Counts cells containing the word “error” anywhere in the text.
=COUNTIF(B2:B20,"Jan*")Counts entries that start with “Jan”.
Wildcards work the same way in COUNTIFS when applied to individual criteria.
When Are COUNTIF and COUNTIFS Better Than Pivot Tables?
Pivot tables are powerful, but they’re not always the best solution. COUNTIF and COUNTIFS shine when:
- You need results directly inside a worksheet
- You want formulas that update automatically
- You’re building dashboards or templates
- You need lightweight analysis without extra setup
For many Sheetrix templates, COUNTIF and COUNTIFS are ideal because they keep logic transparent and editable for users of all skill levels.
What Are the Limitations of COUNTIF and COUNTIFS?
Despite their flexibility, these functions have limits.
Key limitations include:
- They can’t evaluate complex logical OR conditions without multiple formulas
- They don’t return arrays or lists
- They rely on clean, consistent data
- They can become slow with extremely large ranges
In cases where logic becomes more complex, combining COUNTIFS with helper columns or using functions like FILTER may be a better approach.
When Should You Use COUNTIF vs COUNTIFS?
A simple rule of thumb works well:
- Use COUNTIF when you only need one condition
- Use COUNTIFS when you need two or more conditions
Starting with COUNTIFS is often safer when building templates because it scales better as requirements change.
Why COUNTIF and COUNTIFS Are Essential Spreadsheet Skills
COUNTIF and COUNTIFS are foundational functions that appear in nearly every professional spreadsheet use case. They help turn raw data into insights without unnecessary complexity.
Once you understand how to structure criteria properly and when to use each function, you’ll be able to build clearer dashboards, smarter reports, and more useful templates. That’s why COUNTIF and COUNTIFS are featured so often in Sheetrix resources—they solve real problems in a clean, accessible way.
If you’re working with task trackers, budgets, logs, or any structured data, mastering these functions will save time and reduce errors across every spreadsheet you create.







