Spread Formula Reference
Formula Functions / Functions D to G / DCOUNT
In This Topic
    In This Topic

    This function counts the cells that contain numbers in a column of a list or database that match the specified conditions.


    DCOUNT(database, field, criteria)


    This function has these arguments:

    Argument Description
    database Range of cells that make up the database; cell range reference or array
    field [Optional] Column in the database, referred to by label or index
    criteria Range of cells that specify which rows in the database are used; cell range reference or array

    The database argument is a range of cells that make up the database. Each column represents a field. The first row represents the field labels. Each remaining row represents a record of data.

    The field argument determines which column in the database to use. The field argument can be a string (field label) or a number (field index). The field argument is optional. If omitted the function counts all the records that meet the criteria.

    The criteria argument is a range of cells that specify which rows in the database contain the conditions that select a subset of the data in the database. The first row represents field labels. The remaining rows represent conditions. Conditions in the same row are combined using an AND operation. Conditions in different rows are combined using an OR operation. Each condition can be a number or a string. The string can include a comparison operator (=, <>, <, >, <=, >=). If no operator is included then the equal operator (=) is assumed.

    Wild card characters are not supported in the criteria argument.


    This is one of several database or list functions that treat a range of cells as if they were a database. For more details on this type of function, refer to Database Functions .

    Data Types

    Accepts cell ranges or arrays for database and criteria. Accepts a string or a number for field. Returns numeric data.




    Version Available

    This function is available in product version 2.5 or later.

    See Also

    DCOUNTA | COUNT | COUNTA | Database Functions