How to Use the DCOUNT Function in Excel

The DCOUNT function in Microsoft Excel and Google Sheets allows you to count the number of cells within a range that meet specified criteria.

Usage in Excel and Google Sheets

In Excel, the syntax for the DCOUNT function is:

=DCOUNT(database, field, criteria)
  • database: This refers to a range of cells that includes the data you want to count. It must include column headers.
  • field: Indicates the column within the database that contains the values to be counted. Column numbers begin with 1.
  • criteria: Specifies a range of cells that define the conditions for the count. This range also must include column headers.

The syntax for DCOUNT in Google Sheets is identical to that in Excel.

Examples

Consider a basic database in Excel or Google Sheets with the following structure:

Name Age Department
John 25 Sales
Alice 30 Marketing
Bob 28 Engineering

Suppose we need to count the number of employees in the Sales department. Place “Department” as the criterion header in cell E1, and “Sales” as the criterion in E2. You would use the following formula:

=DCOUNT(A1:C4, "Department", E1:E2)

This formula counts how many cells in the “Department” column of the database meet the criteria “Sales”. In this case, the result would be 1, as only John is in the Sales department.

The DCOUNT function is highly useful for extracting specific data based on set conditions, helping in generating precise statistics and insights from your datasets.

More information: https://support.microsoft.com/en-us/office/dcount-function-c1fc7b93-fb0d-4d8d-97db-8d5f076eaeb1

Other functions
Returns the average of selected database entries
Counts nonblank cells in a database
Extracts from a database a single record that matches the specified criteria
Returns the maximum value from selected database entries
Returns the minimum value from selected database entries
Multiplies the values in a particular field of records that match the criteria in a database
Estimates the standard deviation based on a sample of selected database entries
Calculates the standard deviation based on the entire population of selected database entries
Adds the numbers in the field column of records in the database that match the criteria
Estimates variance based on a sample from selected database entries
Calculates variance based on the entire population of selected database entries