π COUNTA Function β Count Non-Empty Cells Easily in Google Sheets
n many situations in Google Sheets, you need to know how many cells actually contain any value β whether it’s a number, text, or date.
For example, to check how many people responded, how many cells are filled out, or whether any data is missing,
you want to count all non-blank entries β not just numbers.
Thatβs where the COUNTA
function comes in.
It counts all non-empty cells, including numbers, text, formulas, and even error messages β only excluding blank cells.
β Function Overview
Function Name | COUNTA |
Purpose | Counts all non-empty cells |
Syntax | =COUNTA(range) |
Return Value | Number of non-empty cells (integer) |
β Example 1: Count text-filled cells
Formula
=COUNTA(A1:A5)
π Spreadsheet Table Example
A | |
1 | Name |
2 | Jane |
3 | John |
4 | |
5 | Alex |
π A1, A2, A3, and A5 contain text, while A4 is blank.
β‘οΈ There are 4 non-empty cells β The result is 4
.
β³οΈ You can use this formula in any cell β the output will stay the same.
β Example 2: Mixed numbers and text
Formula
=COUNTA(B1:B5)
π Spreadsheet Table Example
B | |
1 | 100 |
2 | Product |
3 | 200 |
4 | |
5 | Done |
π B1, B2, B3, and B5 are filled with either numbers or text; B4 is blank.
β‘οΈ Total non-empty cells = 4
β³οΈ The result will be the same wherever the formula is placed.
β Example 3: Count across multiple ranges
Formula
=COUNTA(A1:A3, C1:C3)
π Spreadsheet Table Example
A | B | C | |
1 | 100 | Seoul | |
2 | |||
3 | New | 300 |
π A1, A3, C1, and C3 are filled. A2 and C2 are blank.
β‘οΈ That gives 4 non-empty cells β The result is 4
.
β³οΈ It doesnβt matter where the formula is entered β just keep the ranges accurate.
β Example 4: Use with IF for messaging
Formula
=IF(COUNTA(A1:A10) = 0, "All empty", "Data exists")
π Spreadsheet Table Example (partial)
A | |
1 | 1 |
2 | |
3 | |
4 |
π Only A1 has a value; the rest are blank.
β‘οΈ COUNTA returns 1
β "Data exists"
is shown.
β³οΈ This lets you check whether any input exists in a range.
πΌ Practical Use Cases
- Count how many people responded in a survey
- Verify if required fields are filled out
- Detect missing entries in reports
- Use with conditional formatting to highlight empty rows
β Final Summary
The COUNTA
function counts all non-empty cells β
including text, numbers, dates, and even errors β making it perfect for completeness checks.
π In the next post, weβll cover the ISBLANK
function β the opposite of COUNTA.
Use them together for robust spreadsheet validations!