Quick Formula: Count Rows Matching Two Conditions
COUNTIFS counts rows only when every range-and-condition pair is satisfied at the same time:
=COUNTIFS($B$2:$B$100, "Completed", $C$2:$C$100, "High")
Worked Example: Counting High-Priority Completed Tasks
| Col A (Task) | Col B (Status) | Col C (Priority) | Match Result |
|---|---|---|---|
| Security Audit | Completed | High | Counted (#1) |
| Blog Formatting | Completed | Low | Skipped (Low priority) |
| SSL Renewal | In Progress | High | Skipped (In Progress) |
| Database Backup | Completed | High | Counted (#2 → Total = 2) |
High-Search COUNTIFS Variations
- Count non-blank cells with a condition: Use
"<>"inside quotes:=COUNTIFS($B$2:$B$100, "Completed", $D$2:$D$100, "<>") - Count numbers greater than or equal to a threshold: Use
">=80"or join a cell with">=" & E2. - Partial text match with wildcards: Use
*to match any characters before or after a keyword, such as"*Refund*".
Avoid These COUNTIFS Traps
- Different row lengths across ranges: Every range in
COUNTIFSmust have the exact same row count or you will see#VALUE!. - Extra trailing spaces on text labels: A cell containing
"Completed "will not match"Completed"unless cleaned with TRIM.
Next Step: Need to add up amounts instead of counting rows? Check the SUMIFS Guide or customize your formula in the Formula Finder.