COUNT vs COUNTA in Excel: Why Your Count Returns Zero

COUNT vs COUNTA in Excel: Why Your Count Returns Zero

You select a column of names, type =COUNT(A2:A50), and get zero. The column is full. The formula looks right. Nothing is broken: COUNT was never counting what you thought it was counting. This guide covers what each counting function actually includes, why the zero happens, and how to fix a column of numbers that Excel treats as text.

Version note: COUNT, COUNTA, COUNTBLANK and COUNTIF work the same way in Excel 2016, 2019, 2021, 2024, Microsoft 365, Excel on the web and Excel for Mac. Source: COUNT, COUNTA and COUNTIFS pages in Microsoft Support.

The rule that explains everything

COUNT counts numbers. COUNTA counts anything that is not empty. That single difference produces every surprise people hit with these functions. A cell containing the text "12" is text to Excel, so COUNT skips it and COUNTA includes it. A cell containing a formula that returns an empty string is not empty, so COUNTA counts it and COUNT does not.

FunctionCountsSkips
COUNTNumbers, dates and times (dates are numbers)Text, blanks, empty strings
COUNTAAny cell with content, including text and errorsTruly empty cells
COUNTBLANKEmpty cells and formulas returning ""Everything else
COUNTIFCells matching a condition you writeCells that do not match

Why COUNT returns zero on a full column

The usual cause is imported data. Numbers pasted from a website, a PDF or a text export often arrive as text, and Excel keeps them as text because it has no reason to convert them. They look like numbers, they align left instead of right, and COUNT ignores every one of them.

There are two reliable fixes. The first is to select the column and use Data, then Text to Columns, then Finish: this re-reads each cell and converts anything that looks numeric. The second is a formula: =SUMPRODUCT(--(A2:A50<>"")) counts non-empty cells as numbers, and =COUNT(VALUE(A2:A50)) converts on the fly in newer versions. The first fix is better because it repairs the data rather than working around it.

Counting with a condition

Once the column is clean, COUNTIF handles most real questions: =COUNTIF(B2:B50,"Cairo") counts rows for one city, =COUNTIF(C2:C50,">1000") counts invoices above a thousand, and COUNTIFS adds a second condition without a helper column: =COUNTIFS(B2:B50,"Cairo",C2:C50,">1000").

Two warnings. Wildcards work in text conditions, so "Cairo*" also matches Cairo West. And a criterion built from a cell reference needs the operator in quotes and an ampersand: =COUNTIF(C2:C50,">"&F2), not =COUNTIF(C2:C50,">F2").

When the count is right but the number looks wrong

If COUNT and COUNTA disagree by a small amount, you are looking at a few text-stored numbers, often one trailing space in a cell. TRIM fixes spaces, and LEN confirms the length after trimming. If they disagree by a lot, the column is text throughout and needs the Text to Columns fix above.

Quick checklist

  • Counting numbers or dates: COUNT.
  • Counting anything filled in: COUNTA.
  • Counting with a condition: COUNTIF or COUNTIFS.
  • COUNT returns zero on a full column: numbers stored as text, fix with Text to Columns.
  • Small gap between COUNT and COUNTA: look for trailing spaces and empty-string formulas.

Counting is the cheapest audit you can run on a spreadsheet. A count that does not match the row you can see is the earliest warning that the data underneath is not the type you assume, and it costs one cell to check.

Where Excel behaves differently, the difference is stated in the text.

This is general guidance, not a substitute for checking your own workbook.

Last updated: 3 December 2026

المصدر: Microsoft Support: COUNT function

If you invoice clients or run a small shop, the ready-made Excel sales invoice template and bookkeeping ledger saves building the file from scratch: Excel invoice and bookkeeping template - a product in our store.

المصدر: Microsoft Support: COUNTA function

Why your COUNT returns zero

You select a column of 240 invoices, type =COUNT(A2:A241), and get 0. The numbers are right there on screen. What happened is that every one of those cells is stored as text, and COUNT only counts cells whose type is a number. It skips text, blanks, errors and dates that arrived as strings, and it does so without any warning.

This is not a rare edge case. Anything that passes through a CSV export, a web form, a copy from a PDF or a system that writes quoted values will hand you numbers stored as text. COUNT is the function that tells you about it, if you read the result as a signal instead of a bug.

The same column, three functions

CellContentCOUNTCOUNTACOUNTBLANK
A21200110
A3950110
A41500 as text010
A5n/a010
A6(blank)001
Total241

COUNT says 2, COUNTA says 4, and there is one blank. Adding those two numbers plus the blank gives you the five rows, which is the check that tells you the whole range was read.

Fixing text numbers without retyping

Three routes, in order of safety. First, a helper column with =VALUE(A2), then paste it over the original as values. Second, Data > Text to Columns, finish immediately on the column; Excel re-parses each cell. Third, type 1 in an empty cell, copy it, select the range and use Paste Special > Multiply.

Before you overwrite anything, run =COUNT(A2:A241)+COUNTIF(A2:A241,">0") and compare it with the row count. If they still disagree, some cells are not text numbers at all, they are notes like "n/a" that need their own decision.

Common mistakes

Assuming COUNTA is the safe choice. COUNTA counts errors, notes and a single space. It answers "how many cells have something in them", not "how many numbers do I have".

Using COUNTA on formula columns. A formula returning "" is not blank to COUNTA. Use COUNTBLANK or =SUMPRODUCT(--(LEN(A2:A241)=0)) when the column contains formulas.

Trusting a count without a total. COUNT and SUM disagreeing on the same range is the fastest signal that some values are text. Check both in the same cell block.

FAQ

Does COUNT count dates? Yes, because dates are numbers. That is also why a date column can inflate a count of amounts.

Is COUNTIF faster than COUNTA? On large ranges COUNTIF is usually slower. Use COUNTA for presence and COUNTIF only when a condition is involved.

Why does COUNT return a number lower than the visible rows? Hidden rows still count. Filtered rows do not. If the number changes when you filter, the range is behaving correctly and your expectation is what needs adjusting.

Get new guides by email
One short email when a new guide is published. No spam, and you can leave anytime.
Your address is only used for these emails.

Last updated: 5 December 2026

Comments

Popular posts from this blog

Learn to Code From Zero: A 90-Day Plan That Survives a Full-Time Job

How to Read Your Payslip: Gross, Net, Tax Codes and the YTD Column

iPhone Storage Full? What to Delete First (And What Never to Touch)