Documentation/Calc Functions/DCOUNTA/en

Function name:
DCOUNTA

Category:
Database

Summary:
DCOUNTA counts the number of cells (fields) of the specified column that are not blank, for all rows (database records) that match the specified search criteria. Blank cells of the specified column are not counted. However, if no column is specified, DCOUNTA returns the count of all records that match the specified search criteria irrespective of their contents.

Syntax:
DCOUNTA(Database; [DatabaseField]; SearchCriteria)

Returns:
Returns a non-negative integer that is the number of cells satisfying the specified criteria.

Examples:
The content of cells A12:E12 should be identical to the header labels for the database table in cells A1:E1. Make sure that cells A13:E13 are blank, except for cell D13 which should contain ">600" (this search criterion is intended to match records in the database table that have a value greater than 600 in the Distance to School column).

Many more examples of both search criteria and function calls can be found in this [[Media:Calc_Database_Functions_Examples.ods | Calc spreadsheet]].

Related LibreOffice functions:
COUNTA

DAVERAGE

DCOUNT

DGET

DMAX

DMIN

DPRODUCT

DSTDEV

DSTDEVP

DSUM

DVAR

DVARP

ODF standard:
Section 6.9.4, part 2

Equivalent Excel functions:
DCOUNTA