Author: Oscar Cronquist Article last updated on May 05, 2022

The DCOUNTA function counts nonempty cells in a column you specify, in a database where records also meet a condition or criteria.

Formula in cell B15:


The formula counts records where the number is above 700 or below 250. Also, the cell must not be blank in column 3 (Number).

Only row 9 and row 12 match the criteria, the function returns 2 in cell B15.

Excel Function Syntax

DCOUNT(database, field, criteria)


database Required.  The cell reference to a list or database.
field Optional. The field argument lets you choose which column to use. You can use the column name enclosed with double quotation marks or the corresponding column number. If not entered DCOUNTA counts all records in the database that match the condition.
criteria Required.  A cell reference to the criteria range. The criteria range needs to have column labels and a at least one condition below the column label.


Excel defines a database as a list of related data in which rows of related information are records, and columns of data are fields. The first row of the list contains labels for each column.

Allowed criteria range characters are less than and greater than signs <>, use them to specify a criteria range. Also, asterisks * can be used to match partial strings.

You can place your criteria range wherever you want on your worksheet, however, it is not recommended below the list/database. The function needs a blank row below the list to work properly.

To include the entire list/database enter a blank line below the criteria range column labels.