COUNTA function.Get non-blank counts.(Microsoft Excel)

03/27/2024

Japanese version.

The COUNTA function retrieves the number of non-blank cells in a specified cell range.

It is a companion to the COUNT function to obtain non-numeric counts.

How it works

=COUNTA(value1 to 255)
NameOmissionExplanation
value1 to 255Required argument.
Specify the range of cells from which to obtain the number of cases.

Demonstrate

Not only numbers, but also Boolean values, error values, and strings. Blank cells are excluded.

Blank strings are treated as containing formulas, so they are not judged as blank cells and are counted.

Specify other than cell range.

It is also possible to return a range of cells as a result in a function argument. In that case, the count is taken from the result of that function.

List of functions that result in a range of cells.

FunctionCategoryDescription
TEXTSPLITTextDivides text into cells based on a specified character.
XLOOKUPLookup & ReferenceGet data matching the search value.
FILTERLookup & ReferenceGet a list of data that matches the condition.
UNIQUELookup & ReferenceDelete duplicate data in a specified cell range.
SEQUENCELookup & ReferenceCreate sequential numbers in multiple cells.
SORTLookup & ReferenceSort a range of cells by a specified column.
SORTBYLookup & ReferenceSort a cell range by specifying multiple reference columns.
DROPLookup & Referenceelete a specified number of rows and columns from a specified cell range.
TAKELookup & ReferenceObtains a specified number of rows and columns from a specified cell range.
TOCOLLookup & ReferenceArranges a specified range of cells in a single column.
TOROWLookup & ReferenceSort a specified range of cells into a single column.
EXPANDLookup & ReferenceExtended specified cell range.
CHOOSEROWSLookup & ReferenceGet the row at the specified position from the specified cell range.
CHOOSECOLSLookup & ReferenceGet the column at the specified position from the specified cell range.
WRAPROWSLookup & ReferenceSort a range of cells in a single column or row by a specified number of rows.
WRAPCOLSLookup & Reference
Sort a range of cells in a column or row by a specified number of columns.
VSTACKLookup & ReferenceMerge multiple cell ranges in row direction.
HSTACKLookup & ReferenceMerge multiple cell ranges in column direction.
TRANSPOSELookup & ReferenceCreate a cell range with the rows and columns of the specified cell range swapped.

The range can also be specified as an array.

=COUNTA({1,2,3})

Multiple values can also be specified simply by separating them with commas.

=COUNTA(1,2,3)

Spill

Spill when using the BYROW or BYCOL function.

=BYROW(A1:E5,LAMBDA(r,COUNTA(r)))
Row direction
=BYCOL(A1:E5,LAMBDA(c,COUNTA(c)))
Column direction

---

Links

Count of multiple values or cell ranges.

FunctionImportanceDescription
COUNTHighCount of multiple values or cell ranges.
COUNTAHighGet the number of non-blanks.
COUNTBLANKMiddleGet the number of blanks.
COUNTIFMiddleGet the number of cells matching the search criteria.
COUNTIFSHighGet the number of rows that match multiple criteria.

Microsoft Excel Functions Statistical

Examples of Use

Formula to randomly extract a specified number of cells from a range of cells.

Formula to extract only rows with values.

How to remove duplicates and count them.