Counts how many values are in the list of arguments. Text entries are also counted, even when they contain an empty string of length 0. If an argument is an array or reference, empty cells within the array or reference are ignored.
COUNTA(Number 1 [; Number 2 [; … [; Number 255]]])
Returns an integer value which is the count of non-blank and non-empty entries in arguments or in the cells passed as arguments.
Number 1, Number 2, ..., Number 255 are numbers, references to cells or to cell ranges of numbers.
- The function counts numbers, dates, error values(Err:502), logical values (like TRUE ) or a text representation of numbers (like "7") passed either as arguments or a reference to the cells or as an array however, empty cells in the reference are not counted.
- If you want to avoid counting logical values, text, or error values, refer to the COUNT function.
- For counting number that satisfy a criterion, refer to the COUNTIF function or the COUNTIFS function.
|=COUNTA(2;4;6;"8")||The function counts the number of numeric entries and text representation of numbers.||4|
|=COUNTA(2;4;6;"eight")||Unlike COUNT, this function does count text entries.||4|
|=COUNT(2;4;TRUE)||The function counts the number of numeric entries and logical representation of numbers.||3|
|=COUNTA(;2)||The function counts empty entries.||2|
|=COUNTA("";2)||The function counts empty text entries/empty arguments besides counting the filled ones.||2|
|=COUNTA(A1:A4) where A1, A2, A3 and A4 contains 1, nothing(empty cell), Err:502, student(text)||The function counts error value as well as text but not empty cells||3|
Related LibreOffice functions:
Equivalent Excel functions: