The usual answer to “count cells that are not blank” is =COUNTIF(range, "<>") or COUNTA. Both work on a clean column. But a cell can look empty without being empty: a formula that returns "", or a single space typed by mistake, shows nothing and is still counted. We put every kind of “blank” in one column and ran 13 formulas on it. The results went from 5 to 9.
The test column
G2:G13 holds twelve cells. Three are truly empty; the others contain:
| Cell | Contents | What you see |
|---|---|---|
| G2, G10, G12 | The text ok, Done and x | The text |
| G4, G11 | The formula ="" |
Nothing |
| G5 | A single space | Nothing |
| G6 | The number 0 | 0 |
| G7 | FALSE | FALSE |
| G8 | A dash, – | – |
| G3, G9, G13 | Nothing at all | Nothing |
So 6 cells have visible content, and 9 cells are technically not empty.
Tested in Google Sheets. Every formula on this page was run on November 12, 2026, and the results below are the ones Google Sheets returned. How we test
Results: which formula counts what
| Formula | Result | What it counted |
|---|---|---|
=COUNTA(G2:G13) |
9 | Everything except the 3 truly empty cells |
=COUNTIF(G2:G13, "<>") |
9 | The same 9, including both ="" cells |
=SUMPRODUCT(--NOT(ISBLANK(G2:G13))) |
9 | The same 9 |
=COUNTIFS(G2:G13, "<>", G2:G13, "<> ") |
8 | The 9, minus the space |
=ROWS(G2:G13) - COUNTBLANK(G2:G13) |
7 | Everything except the empty cells and the ="" cells |
=SUMPRODUCT(LEN(G2:G13) > 0) |
7 | The same 7: the space, 0 and FALSE are in |
=COUNTA(FILTER(G2:G13, G2:G13<>"")) |
7 | The same 7 |
=COUNTIF(G2:G13, "*") |
7 | Text only, including the ="" cells; not 0 or FALSE |
=SUMPRODUCT(LEN(TRIM(G2:G13)) > 0) |
6 | Only the cells with visible content |
=COUNTIF(G2:G13, "?*") |
5 | Text with at least one character: ok, the space, -, Done, x |
=COUNT(G2:G13) |
1 | Numbers only: the 0 |
Found in testing: COUNTIF with "*" is often suggested for “count cells with any text”, but it counted the two ="" formulas as text. It returned 7, and only 5 cells contain characters. "?*", which asks for at least one character, returned 5.
Which one to use
- Count cells you can see something in:
=SUMPRODUCT(LEN(TRIM(G2:G13))>0). It was the only formula that returned 6. TRIM turns the stray space into nothing, and LEN measures what’s left, so=""and spaces drop out while 0 and FALSE stay in. - Count every cell that isn’t truly empty: COUNTA or
COUNTIF(range, "<>"). Use them when the column has no formulas that return"". - Count only text answers:
COUNTIF(range, "?*"). It skips numbers, TRUE/FALSE and the=""formulas. A lone space still counts as text. - Count only numbers: COUNT.
TRIM removes ordinary spaces only. A non-breaking space, common in data pasted from web pages, survives it; our guide to removing extra spaces covers that character.
Not blank together with another condition
COUNTIFS accepts "<>" like any other condition. Rows where the rep in column B is Ben and the note in G is not blank:
=COUNTIFS(B2:B13, "Ben", G2:G13, "<>")
returned 2 (the 0 and Done). To leave out spaces and ="" as well, switch to SUMPRODUCT, which multiplies the two tests row by row:
=SUMPRODUCT((B2:B13="Ben") * (LEN(TRIM(G2:G13)) > 0))
This also returned 2 here, since none of Ben’s notes was a space. More combinations are in COUNTIF with multiple criteria.
SUMIF works the same way: =SUMIF(G2:G13, "<>", E2:E13) added up the amounts in column E on the 9 rows that COUNTIF counts as not blank. The result was 850, and the text “100” on one of those rows was not added.
Counting the blanks instead
=COUNTBLANK(G2:G13) and =COUNTIF(G2:G13, "") both returned 5: the 3 empty cells plus the 2 ="" cells. COUNTBLANK and COUNTA don’t add up to the number of cells (5 + 9 = 14, for 12 cells), because both count the ="" cells.
The same split shows up cell by cell. On the ="" cell G4, =ISBLANK(G4) returned FALSE, while =G4="" returned TRUE. On the truly empty G3, both returned TRUE. So if you mark cells as blank with =G4="" and count them with ISBLANK, the two won’t agree.