Excel COUNT Functions Explained: COUNT vs COUNTA

Learn how to count numeric and non-empty cells.

Most tutorials tell you that COUNT handles numbers and COUNTA handles everything else, and leave it at that. That split-second explanation is exactly why so many people end up with wrong totals that look completely fine. I've been using Excel COUNT functions professionally for close to 20 years (across finance roles, analyst work, and more dashboards than I care to count), and the number of times I've seen a COUNTA result look plausible while being silently wrong is not small. This guide is built around those failure points, not just the syntax.

Before you write a single formula, you need to make a decision: which function actually matches what you're counting? Get that wrong and Excel won't warn you. It'll just hand you a number.

You'll need a dataset to follow along. Something with mixed content works best: a column of numeric entries, a column with names or status labels, and a few cells that look empty but might not be. That last part matters more than most guides admit. If you're newer to Excel generally, the Excel for Beginners starter guide covers the groundwork worth having before this.


Step 1: Choose the Right Excel COUNT Function Before You Type a Single Formula

There are five functions in this family worth knowing. Picking the right one upfront saves you from results that are off by two or twelve with no obvious reason why.

COUNT vs. COUNTA: The One-Line Decision Rule

COUNT only counts cells that contain numeric values in Excel: dates, times, and actual numbers. Nothing else. If your column has names, status labels, or any text at all, COUNT returns zero for those cells and doesn't blink. COUNTA counts every cell that isn't completely empty, regardless of what's in it. Numbers, text, a single letter, a hyphen: COUNTA counts it.

The one-line rule: if your data is all numbers, use COUNT. If it has any text, or if you're checking how many cells have been filled in at all, use COUNTA.

When to Bring In COUNTBLANK, COUNTIF, or COUNTIFS

COUNTBLANK does the opposite of COUNTA: it counts empty cells. Useful for auditing incomplete data, like checking how many rows in a client list are still missing a phone number.

COUNTIF adds a single condition. Count how many cells in a column equal "Closed," or how many sales figures are above $5,000 — that's COUNTIF territory. COUNTIFS handles multiple criteria at once: closed deals in a specific region, or entries from Q3 that also meet a revenue threshold. Once you're filtering by more than one condition, COUNTIFS is the one to use. Both are covered in Step 3.

One behavior worth knowing before you move on: if you type values directly into a COUNT argument — like =COUNT(1, "2", TRUE) — COUNT treats quoted numbers as numeric and counts TRUE/FALSE as 1 and 0. That's specific to direct arguments. In a range reference, COUNT ignores text and Booleans entirely. It surprises people.


Step 2: Build Your COUNT and COUNTA Formulas (With the Edge Cases Covered)

Now that you've picked the right function, here's how to actually write it — and where it'll quietly go wrong if you're not watching.

Writing COUNT and COUNTA for a Real Dataset

Say you're working with a sales report. Column A has rep names (Sarah Chen, Marcus Rivera, James Okafor, and so on), and column B has their Q3 deal values: some numeric, some blank because the deal hasn't closed yet.

  1. Click an empty cell where you want the result.
  2. Type =COUNT(B2:B20) and press Enter. This returns the count of cells in that range that contain numeric values — closed deals only.
  3. In a separate cell, type =COUNTA(A2:A20) and press Enter. This returns the number of rep names entered, essentially how many rows have been filled in at all.

Those two numbers together tell you something useful: how many reps are listed versus how many have recorded a deal value. The gap is your pipeline.

The Hidden-Space and Pseudo-Blank Problem

Here's the one that gets experienced users. A cell can look completely empty and still be counted by COUNTA.

If someone hit the spacebar in a cell, COUNTA counts it. If a formula in that cell returns "" (an empty string, which people often use to suppress a visible zero or hide an error), COUNTA counts it. The cell looks blank. It is not blank.

A cell containing a single space and a truly empty cell are indistinguishable to the eye and completely different to COUNTA.

The fix is =TRIM() on your source data, or using COUNTIF with a wildcard to count only cells with real content: =COUNTIF(A2:A20,"?*") only matches cells with at least one actual character. This is especially relevant in Microsoft 365 environments where data often arrives from external sources or form feeds with invisible trailing characters baked in.


Step 3: Extend to COUNTIF, COUNTIFS, and Counting Unique Values in Excel 365

Once you've got COUNT and COUNTA working cleanly, adding conditions is the next logical move — and COUNTIF is where most real-world counting actually happens.

Adding Criteria with COUNTIF and COUNTIFS

COUNTIF syntax: =COUNTIF(range, criteria). To count how many deals in column C are labeled "Won": =COUNTIF(C2:C20,"Won"). COUNTIF supports wildcard characters — an asterisk matches any sequence of characters, so =COUNTIF(C2:C20,"*pending*") catches "pending review," "pending approval," and anything else containing that word.

COUNTIFS extends this to multiple criteria ranges: =COUNTIFS(C2:C20,"Won",D2:D20,">5000") counts rows where the status is Won and the deal value exceeds $5,000. You can apply a date range the same way: two criteria on the same date column, one for the start date and one for the end.

Counting Unique Values in Excel 365

For counting unique values in Excel 365, the old approach required array formulas that were genuinely painful to maintain. The modern way is cleaner: =COUNTA(UNIQUE(A2:A20)). UNIQUE returns a list of distinct values from your range, and COUNTA counts how many there are. Available in Microsoft 365 and Excel 365 only. If you're on an older version, you're stuck with the array formula approach.

If you want to go deeper on building conditional logic into your spreadsheets, the Excel Formulas and Functions for Beginners guide covers the broader foundation these functions sit inside.


Common Mistakes With Excel COUNT Functions (and How to Catch Them)

Four mistakes I see repeatedly, including from people who've been using Excel for years.

  1. Running COUNT on a text column and getting zero, then assuming the column is empty. It's not. COUNT doesn't count text. Ever. If you need to count cells that contain text, use COUNTA or COUNTIF with a wildcard.
  2. Trusting COUNTA when your data came from an import, a form submission, or a formula that outputs "". COUNTA will inflate your count with pseudo-blank cells and you won't see it happen. Run a COUNTIF with a wildcard against the same range and compare the two numbers. If they don't match, you've got invisible content somewhere.
  3. Misaligned criteria ranges in COUNTIFS. Each criteria range must be the same size as the first one and line up row-for-row. If your ranges are different sizes or offset by even one row, COUNTIFS returns a wrong number without any error message. This is one of the more common reasons COUNTIF appears not to be counting correctly — the formula looks fine, the result is wrong, and nothing flags it. Check your ranges.
  4. Assuming COUNTIF is case-sensitive. It isn't. "WON" and "won" return the same count. If case matters in your dataset — say you're auditing entries where someone typed status codes in lowercase by accident — you'd need a workaround using EXACT inside a SUMPRODUCT formula instead.
If you take one thing from this article, make it the COUNTA and pseudo-blank issue. It's the mistake that produces numbers that look right, pass a quick scan, and only surface as wrong when someone asks a question your report can't answer. Clean your source data, verify with a COUNTIF wildcard check, and don't assume a cell is empty just because it looks that way.

Frequently Asked Questions

What is the difference between COUNT and COUNTA in Excel?

COUNT only counts cells that contain numeric values — numbers, dates, and times. COUNTA counts every cell that isn't completely empty, including cells with text, symbols, or even a single space. Use COUNT for numeric data, COUNTA when you need to count all filled-in cells regardless of type.

Why is COUNTA counting blank cells?

Cells that look empty aren't always truly empty. A cell containing a space, an apostrophe, or an empty string returned by a formula (like ="") will be counted by COUNTA even though it appears blank. Use =COUNTIF(range,"?*") to count only cells with real content, or clean your data with TRIM first.

When should I use COUNTIFS instead of COUNTIF?

Use COUNTIF for a single condition. Switch to COUNTIFS the moment you need two or more — for example, counting rows where the status is "Won" and the deal value exceeds a certain amount. COUNTIFS handles multiple criteria ranges and is also the right choice for date range filtering.

How do I count unique values in Excel 365?

In Excel 365 and Microsoft 365, use =COUNTA(UNIQUE(range)). The UNIQUE function returns a list of distinct values from your range, and COUNTA counts how many there are. This replaces the older array formula approach, which worked but was harder to read and maintain.