Category: FUNCTION | Updated: 2026-11-20
How to Use the COUNTA Function in Google Sheets | Count Non-Blank Cells
How to Use the COUNTA Function
The COUNTA function counts the number of “non-blank cells” (including text, numbers, dates, error values, etc.) within a specified range. It is one of the most commonly used functions for tracking data entry counts.
Syntax
=COUNTA(value1, [value2, ...])
- value1: The first value, cell reference, or range in which to count non-blank cells (required).
- value2, …: Additional values or cell ranges to include in the count, separated by commas (optional).
Table Example
Here is an example of counting the number of applicants (entries with data) from the following registration list.
| Row | Column A (Applicant Name) | Column B (Notes) |
|---|---|---|
| 1 | Applicant Name | Notes |
| 2 | Kobayashi | Attending |
| 3 | Kato | (Blank) |
| 4 | Yoshida | Attending online |
| 5 | (Blank) | (Blank) |
| 6 | Registration Count | =COUNTA(A2:A5) |
- Formula:
=COUNTA(A2:A5) - Result:
3 - Explanation: Text is entered in A2 through A4 while A5 is blank, so
3is returned. If you target Column B with=COUNTA(B2:B5), only B2 and B4 have entries, so the result is2.
Common Errors and Notes
- Empty strings (
"") are also counted: A cell whose formula returns""(a zero-length string) looks empty, butCOUNTAtreats it as containing data and counts it. To exclude these, use=COUNTIF(A2:A5, "<>")or=COUNTA(FILTER(A2:A5, A2:A5<>"")). - Watch out for spaces (whitespace characters): Cells containing only a space character (half-width or full-width) are also counted.
- Error values are also counted: Cells within the range that contain errors such as
#N/Aor#REF!are not blank, so each is counted as 1.
Frequently Asked Questions
Q. Why does COUNTA count a cell that looks completely blank?
A. If a cell contains a half-width or full-width space, or if a formula such as IF returns an empty string (""), the cell is not truly blank and COUNTA will count it as 1 item.
Q. How do I accurately count data rows while excluding the header row?
A. Either reference the entire column and subtract 1 for the header row, like "=COUNTA(A:A)-1", or start the range from row 2 onward, like "=COUNTA(A2:A)".