| Function category | Statistical |
| Volatility | Non-volatile |
| Similar functions | COUNT |
| Syntax | COUNTA(value1, [value2], ...) |

What does the COUNTA function do?
The function counts the number of non-empty cells in one or more selected ranges.
Syntax
The function syntax includes one required argument and additional optional arguments, up to 256 total. The argument can be a range of any size,
=COUNTA(range1, [range2], ...)Support for multiple arguments allows you to simultaneously check whether data is filled in multiple unrelated ranges, including on different sheets.
Formatting
The function accepts any input values, including calculation results, manually entered text, numeric and other values, data ranges of any size, including single cells. See examples in the header.
Counts cells containing text, even if the text string is empty (“”).
Counts cells with error values (e.g., #DIV/0!, #N/A).
Return value format is a positive integer or 0 (zero).
Examples of COUNTA usage
The function is useful as an auxiliary tool in situations where you need to determine whether a range contains any values or not.
Example 1. Removing empty rows
In short – empty rows often interfere with data analysis (read more about why it’s important and how to remove empty rows in Excel using various methods). But deleting them isn’t easy, especially if there are many.
A pragmatic solution is to use the COUNTA function in the first column to check rows for data. If the value is greater than zero, the row is not empty and shouldn’t be deleted. And vice versa :)
Example 2. Employee salary calculation
Let’s say the office has a device at the entrance that identifies employees by fingerprints. The COUNTA function in Excel can be used to count the number of days when an employee registered at the entrance. Here’s how it might look:

- Each time an employee comes to work and passes fingerprint identification, the system registers their presence that day.
- Registration data is exported to Excel, where each row corresponds to an employee, and each column corresponds to a specific working day of the month. The employee’s arrival time on a particular day is marked in the corresponding cell.
- The COUNTA function is used to count the number of days each employee was registered at work. For example, the formula
=COUNTA(B2:AF2)will count the number of filled cells in row 2 from B2 to AF2, which corresponds to the number of days the employee was at the workplace. - Using the counted number of working days, the accountant can calculate the employee’s salary by multiplying this number by the daily pay rate.
This method allows the accountant to automate the process of counting working days and facilitates salary calculation based on employees’ actual presence at work.
Like the article? Help its author! Buy !SEMTools, it has lots of useful instruments to process text data.
This post is also available in RU.