What Most People Miss About COUNTA in Excel

Most Excel trainers tell you COUNTA counts 'non-empty cells.' That’s dangerously incomplete. It counts cells with any content — including #N/A errors, zero-length strings (""), and spaces typed with the spacebar. If you’re using COUNTA to check for user input, you’ll get false positives. Every time.

Quick Answer

COUNTA counts cells that contain anything: numbers, text, logical values (TRUE/FALSE), errors (#REF!, #VALUE!), and even zero-length strings (""). It ignores truly blank cells — but only those with no formula and no characters at all. A cell with ="" or a single space counts as non-blank.

All the Methods

MethodStepsBest ForLimitations
=COUNTA(A1:A12)Type formula directly or use Formulas → More Functions → Statistical → COUNTAQuick headcount of entries in a clean columnFails if range contains "" from formulas or accidental spaces
=SUMPRODUCT(--(TRIM(A1:A12)<>""))Enter as regular formula (no Ctrl+Shift+Enter needed)Counting cells with *visible* content — ignores spaces and ""Slower on >50k rows; won’t catch leading/trailing spaces inside TRIM unless used correctly
=COUNTIF(A1:A12,"?*") + COUNTIF(A1:A12,"*?")Two COUNTIFs: one for text starting with any char, one ending with any charCounting cells with actual text (excludes numbers, errors, blanks)Excludes numeric entries like 42 or 3.14 — even if they’re meaningful data
Alt + M, M, S (Formula Auditing → Evaluate Formula)Select cell with COUNTA → Alt+M,M,S → step through evaluationDiagnosing why COUNTA returns unexpected resultsOnly works on one cell at a time; requires manual inspection
Conditional Formatting + COUNTAHighlight cells with =LEN(TRIM(A1))=0 → then COUNTA on visible rangeVisual audit of 'empty-looking' but non-blank cellsDoesn’t change COUNTA result — just reveals root cause

Method 1 Deep Dive

Let’s test =COUNTA(B2:B11) on real payroll data:

EmployeeStatusStart Date
Sarah ChenActive2023-04-12
James RiosOn Leave2023-09-05
Maya Patel#N/A2024-01-22
Diego Torres""2024-03-15
Aisha Kim 2023-11-30
Rajiv SinghTerminated2022-07-18
Lena WuActive2024-02-09
Tariq Ali#REF!2023-08-01
Zara Lin" "2024-04-03
Omar Hassan[blank]2023-05-11

In B2:B11 (Status column), COUNTA returns 9 — not 7. Why? Because rows 4 (""), 5 (space), 8 (#REF!), and 9 (" ") all count. Only row 10 is truly blank. Use =LEN(TRIM(B4)) to confirm B4 is 0, yet COUNTA sees it. This is why relying on COUNTA for data validation fails.

Method 2 Deep Dive

The reliable alternative: =SUMPRODUCT(--(TRIM(B2:B11)<>\

Rachel Torres

Rachel Torres

Rachel coaches teams on email management and digital communication best practices. She has trained over 5