COUNTA is an Excel function that counts every cell in a range that is not empty — numbers, text, dates, errors, and even a lone apostrophe or space. The syntax is =COUNTA(value1, [value2], ...), where each argument is a cell reference, range, or value. Where COUNT ignores anything that is not a number, COUNTA ignores nothing except truly blank cells, which makes it the right tool when you want to know how many rows in a list have been filled in.
Background: Where COUNTA Comes From
COUNTA is not slang, informal, or nonstandard — it is a standard, officially documented function name in Microsoft Excel. The name is a contraction of "count" and "all." It has shipped with Excel since very early versions, and the same function exists under the identical name in Google Sheets, LibreOffice Calc, Apple Numbers, and most other spreadsheet programs, so formulas generally move between apps intact.
In Excel's function reference it is grouped with the statistical functions rather than the logical ones, even though people mostly use it for data hygiene. The "A" suffix is the part that matters: Microsoft uses that pattern for functions that treat text as valid data. COUNT only likes numbers; COUNTA likes anything with content.
How COUNTA Works Under the Hood
Excel decides a cell is worth counting if it evaluates to something other than empty. That broad rule explains its behavior in every edge case:
- Text of any length counts, including a single letter or a hyphen used as a placeholder.
- Numbers, dates, and times count, because Excel stores them as numbers.
- Logical values typed directly as arguments (
=COUNTA(TRUE)) count; TRUE or FALSE produced by a formula also counts. - Error values such as #N/A or #DIV/0! count, because they are not blank.
- Formulas returning an empty string ("") count, even though the cell looks empty on screen. This is the single biggest source of surprising totals.
- Cells containing only a space count. A space is a character, so Excel sees content.
- Truly empty cells do not count, and neither do references to blank cells passed as arguments.
COUNTA accepts up to 255 arguments in current Excel versions, and you can mix individual cells with whole ranges: =COUNTA(A2:A100, D2:D100) totals both columns. Whole-column references like =COUNTA(A:A) work too, though Excel stops counting at the sheet's row limit, so they are slower than a bounded range on very large workbooks.
Worked Examples
Suppose column A holds a list of customer names in A2:A11, with A4 and A7 genuinely empty. =COUNTA(A2:A11) returns 8. If someone pressed the spacebar into A4 to "clear" it, COUNTA returns 9 — the cell is not blank any more.
Now suppose a formula in B2:B11 is =IF(C2="","",C2*2). If C5 is blank, B5 shows "" and looks empty. =COUNTA(B2:B11) still returns 11, while =COUNT(B2:B11) returns 10, because COUNT skips the text result. If you need to count only cells that look filled, wrap the criteria in COUNTIF: =COUNTIF(B2:B11,"?*") counts text-containing cells and ignores empty strings and numbers.
A common pairing is a completeness check. =COUNTA(A2:A101) next to =COUNTA(B2:B101) immediately shows whether one column has gaps — for example, 100 email addresses against 94 phone numbers tells you six people left the phone field blank.
COUNTA vs COUNT vs COUNTBLANK vs COUNTIF
Choosing the right function is mostly about what you want to treat as data:
- COUNT counts numeric entries only. Use it for scores, quantities, or dates.
- COUNTA counts all non-empty entries. Use it for names, IDs, notes, or mixed text and numbers.
- COUNTBLANK counts empty cells in a range. Handy for spotting missing fields, but it also counts empty strings returned by formulas, so it can disagree with what you see.
- COUNTIF and COUNTIFS count entries matching conditions, such as
=COUNTIF(D2:D500,"Yes")or=COUNTIFS(A2:A500,"North",E2:E500,">0"). - SUBTOTAL with function number 3 (
=SUBTOTAL(3, A2:A500)) counts non-empty cells but ignores rows hidden by a filter — the better choice for tables you filter.
The most widespread misconception is that COUNTA measures "rows with data." It measures non-empty cells. In a table where every row has an ID in column A, the two match, which is why COUNTA often works fine as a row counter. The moment a column has gaps, or a formula outputs "", the result drifts from the number of visible rows.
Common Problems and How to Fix Them
Almost every COUNTA complaint traces back to hidden characters or weird results. Work through these checks:
- Select the range and look at the status bar. Excel shows Count and CountA in the bottom bar for the selection. If the status bar CountA is higher than you expect, look for cells that appear blank but are not.
- Find invisible characters with
=LEN(A2). A value of 1 for a cell that looks empty confirms a space or non-printing character. Use Find & Replace (Ctrl+H) with a single space in "Find what" and nothing in "Replace with," but apply it deliberately — it will also alter legitimate spaces inside names. - Check for trailing spaces. A trailing space also breaks COUNTIF, VLOOKUP, and XLOOKUP matches, so cleaning it fixes several problems at once.
=TRIM(A2)in a helper column is the safe route. - Decide about errors. If a range should hold numbers but contains #N/A, COUNTA counts those errors as data. Combine COUNTA with COUNT to detect the discrepancy.
- Watch for merged cells. In a merged block, only the top-left cell holds the value; COUNTA counts one entry, not the visual block.
- Remember structured references. In an Excel Table, recalculates as rows are added — usually what you want, but it changes totals without warning when new rows appear.
If COUNTA Gives the Wrong Number
Start by counting the same range with COUNT and COUNTBLANK and comparing the three results. If COUNT plus COUNTBLANK plus COUNTA does not equal the number of cells, formulas returning "" are present. Test with =COUNTIF(range,"="), which counts empty strings specifically. If the three do add up but the total still feels inflated, clean the data with TRIM and remove stray characters before relying on the count for anything important.
Frequently Asked Questions
Does COUNTA count blank cells?
No. Truly empty cells are the only thing COUNTA skips. Cells that merely look blank — containing a space, a formula returning "", or a non-printing character — are counted.
Why does COUNTA return a number higher than my visible rows?
Either some cells contain invisible characters, or formulas are returning empty strings that COUNTA treats as content, or the range extends past your data into cells with formatting and stray entries. Check with LEN and COUNTIF as described above.
Can COUNTA count cells with a specific value?
Not by itself. COUNTA has no criteria argument. Use COUNTIF for a value or condition, and COUNTIFS when you need several conditions at once.
What is the difference between COUNTA and COUNT?
COUNT counts only numeric entries, including dates and times. COUNTA counts every non-empty entry, including text, logical values, and error values. If a column holds names, COUNT returns 0 while COUNTA returns the real total.
Does COUNTA work in Google Sheets and Excel the same way?
Yes. Both use the same name, syntax, and rule of counting all non-empty cells, so formulas usually transfer without edits. Minor differences exist in error handling for array arguments, so verify after moving a complex formula.
How do I count non-empty cells while ignoring filtered-out rows?
Use =SUBTOTAL(3, range). Function number 3 is COUNTA's behavior inside SUBTOTAL, and SUBTOTAL skips rows hidden by a filter, which plain COUNTA does not.