Documentation/Calc Functions/DCOUNT/en

Function name:
DCOUNT

Category:
Database

Summary:
DCOUNT counts the number of cells (fields) of the specified column that contain numeric values, for all rows (database records) that match the specified search criteria. However, if no column is specified, DCOUNT returns the count of all records that match the specified search criteria irrespective of their contents.

Syntax:
DCOUNT(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:
COUNT

DAVERAGE

DCOUNTA

DGET

DMAX

DMIN

DPRODUCT

DSTDEV

DSTDEVP

DSUM

DVAR

DVARP

ODF standard:
Section 6.9.3, part 2

Equivalent Excel functions:
DCOUNT