How it works.
COUNTIFS counts the number of cells in one or more ranges that meet a set of conditions. You can add up to 127 criteria ranges and conditions.
💡 In simple terms.
Counts how many cells in one or more ranges meet specific conditions.
"Think of this like counting toys. It counts only the toys that match your description (like counting only red blocks, ignoring blue cars and red balls)."
Formula syntax.
Standard Excel Notation=COUNTIFS(criteria_range1, criteria1, [criteria_range2, criteria2], ...)[like_this] are optional; all other arguments are required.Formula arguments.
Every parameter accepted by the COUNTIFS function is detailed below.
The first range to apply the first condition against.
Example value:A2:A6The condition to check in criteria_range1.
Example value:"Pending"The second range to evaluate.
Example value:B2:B6The condition to check in criteria_range2.
Example value:">100"Simple example.
Step-by-Step ScenarioFiltered Survey Counts
Count how many high-spending customers gave a positive response.
| Customer | Purchase Size | Feedback Yes/No | Min Purchase | Qualified Count |
|---|---|---|---|---|
| John | 120 | Yes | >=100 | — |
| Sarah | 45 | Yes | — | — |
| Mike | 250 | No | — | — |
=COUNTIFS(B2:B6, ">=100", C2:C6, "Yes")Evaluates COUNTIFS over the sample table cells, placing the verified output in cell E2.
Formula generator.
Full Generator WizardCustomize the argument fields below to generate a tailored COUNTIFS formula ready to paste directly into your worksheet.
=COUNTIFS()Expected result behavior.
Returns "Calculated output" based on sample evaluation criteria and active cell references.
Best Practices
- Use wildcards like "?" (matches single char) and "*" (matches any sequence) to count partial text matches.
- Use COUNTIFS to count blanks using double quotes: "" or non-blanks using "<>".
Common Mistakes
- Just like SUMIFS, all criteria ranges must be the exact same height and width, or the function fails with a #VALUE! error.
Platform & version compatibility.
Verified platform compatibility matrix based on actual spreadsheet calculation engine specifications.
Core standard function supported across all modern and legacy Microsoft Excel versions (365, 2021, 2019, 2016, 2013, 2010), as well as Excel for the Web and Mac.
100% compatible with Google Sheets. Uses identical argument order, data types, and standard calculation logic.
Frequently asked questions.
Technical Q&ACan I use COUNTIFS across different worksheets in Excel?↓
Yes. You can reference cells located on other sheets by including the sheet name followed by an exclamation mark, for example: =COUNTIFS(Sheet2!A2:A10). If the sheet name contains spaces, enclose it in single quotes: ='Q1 Report'!A2:A10.
What is the most common reason for errors in COUNTIFS?↓
Just like SUMIFS, all criteria ranges must be the exact same height and width, or the function fails with a #VALUE! error.
Does COUNTIFS work identically in Google Sheets?↓
Yes, COUNTIFS is supported in both Microsoft Excel and Google Sheets with standard evaluation behavior.