Use COUNTIF when you need one simple answer: “How many cells match this thing?” Excel and Google Sheets use almost the same formula: =COUNTIF(range, criteria). Microsoft defines COUNTIF as a way to count cells that meet a condition [source: Microsoft].
TLDR: Excel and Google Sheets both handle COUNTIF in a very similar way. If column A has 100 invoice statuses, =COUNTIF(A2:A101,"Paid") tells you how many are paid. If it returns 68, then 68% of those invoices are done. Excel feels better for large local files, while Google Sheets feels better when five people are editing the same tracker.
What COUNTIF Does
COUNTIF counts matching values.
That is it. No drama.
You give it two things:
- A range, like
A2:A100 - A rule, like
"Apple"or">50"
The formula looks like this:
=COUNTIF(A2:A100,"Apple")
This counts how many cells in A2:A100 say Apple.
Common COUNTIF Examples
Here are the ones people use all the time.
=COUNTIF(B2:B50,"Done")counts tasks marked Done.=COUNTIF(C2:C50,">100")counts numbers over 100.=COUNTIF(A2:A50,"*gmail.com")counts email addresses ending in gmail.com.=COUNTIF(D2:D50,"")counts blank cells.=COUNTIF(D2:D50,"<>")counts non-blank cells.
The star symbol * is a wildcard. It means “anything.” So "*gmail.com" means any text that ends with gmail.com.
The question mark ? is also a wildcard. It means one character. So "A?C" matches ABC, A1C, and Axc.
Excel vs Google Sheets: What Is the Same?
Good news. The basics match.
In both tools, the formula is:
=COUNTIF(range, criteria)
Both can count:
- Text
- Numbers
- Dates
- Blank cells
- Cells above or below a value
- Cells with partial text
Both are also not case-sensitive. This is a tiny detail that can save your mood.
For example:
=COUNTIF(A2:A20,"apple")
This will count apple, Apple, and APPLE.
Nice. Also slightly sneaky.
Where Excel Feels Better
Excel is great when your file is big and serious.
Think finance reports. Sales exports. Inventory sheets with thousands of rows.
Excel has strong desktop performance. It also works well with formatted tables. If your data is inside an Excel Table, you can write cleaner formulas like this:
=COUNTIF(Table1[Status],"Paid")
That reads nicely. It also stays neat when the table grows.
Excel is also a good choice when your company already uses Microsoft 365. Files often connect to Power Query, Power Pivot, and other Excel tools. COUNTIF may be simple, but it fits into those bigger workflows.
Honestly, it feels like Excel is happier when the spreadsheet gets heavy.
Where Google Sheets Feels Better
Google Sheets wins when people need to work together.
If three teammates are updating a campaign tracker, Sheets feels natural. Everyone sees changes fast. No one emails “final final version 7.xlsx.” Bliss.
COUNTIF works the same way here:
=COUNTIF(B2:B100,"Published")
This could count how many blog posts are live.
Sheets also plays nicely with online data. You can pair COUNTIF with functions like FILTER, IMPORTRANGE, and QUERY. That makes it handy for shared reports.
The annoying part? Large Google Sheets can slow down. Watching a simple count refresh for a few extra seconds is not fun. It drives me crazy when the sheet pauses after every paste.
Criteria Rules That Trip People Up
COUNTIF is simple. But the criteria part can be picky.
If you count text, use quotes:
=COUNTIF(A2:A40,"Red")
If you count numbers with a comparison, use quotes:
=COUNTIF(B2:B40,">25")
If you count an exact number, quotes are optional:
=COUNTIF(B2:B40,25)
If your rule uses another cell, join it with &:
=COUNTIF(B2:B40,">"&E1)
So if E1 contains 25, the formula counts values greater than 25.
Real Use Case: Support Tickets
Say you run a support team.
You have 500 tickets in a sheet. Column C shows status. You want quick counts.
=COUNTIF(C2:C501,"Open")gives open tickets.=COUNTIF(C2:C501,"Closed")gives closed tickets.=COUNTIF(C2:C501,"Escalated")gives risky tickets.
If 75 tickets are open, that is 15% of the list. If 30 are escalated, that is 6%. Those numbers help you spot trouble fast.
No chart required. No meeting required. Lovely.
When COUNTIF Is Not Enough
COUNTIF checks one condition.
Need two or more rules? Use COUNTIFS.
For example:
=COUNTIFS(A2:A100,"North",B2:B100,"Paid")
This counts rows where region is North and status is Paid.
Use COUNTIF for one match. Use COUNTIFS for many matches.
Which One Should You Use?
Use Excel if your file is large, private, and tied to heavier reporting.
Use Google Sheets if your team shares the file and updates it all day.
For basic COUNTIF work, both are great. The formula barely changes. The real choice is about how you work.
If you just need to count matching values, do not overthink it. Pick your sheet. Type the formula. Let COUNTIF do the boring counting.