COUNTA

Counts the number of arguments that are not empty.

Syntax

COUNTA(value1,value2, ...)

Value1, value2, ...   are 1 to 30 arguments representing the values you want to count. In this case, a value is any type of information, including empty text ("") but not including empty arguments. If you do not need to count logical values, text, or error values, use the COUNT function.

Example

Col1Col2Col3Col4Col5Col6Col7Formula Description (Result)
Sales12/8/2008 1922.24TRUE#DIV/0!=COUNTA([Col1],[Col2],[Col3],[Col4],[Col5],[Col6],[Col7]) Counts the number of nonblank arguments in the list (6)
Sales12/8/2008 1922.24TRUE#DIV/0!=COUNTA([Col4],[Col5],[Col6],[Col7])) Counts the number of nonblank arguments in the last 4 rows of the list (4)
Sales12/8/2008 1922.24TRUE#DIV/0!=COUNTA([Col1],[Col2],[Col3],[Col4],[Col5],[Col6],[Col7],2) Counts the number of nonblank arguments in the list and the value 2 (7)
Sales12/8/2008 1922.24TRUE#DIV/0!=COUNTA([Col1],[Col2],[Col3],[Col4],[Col5],[Col6],[Col7], "Two") Counts the number of nonblank arguments in the list and the value "Two" (7)