You can use the **DCOUNT** function in Excel to count the total cells that contain a number in a column that meet one or more specific conditions.

This function uses the following basic syntax:

**DCOUNT(database, field, criteria)**

where:

**database**: The range of cells that make up the “database” of interest**field**: The column to count cells in**criteria**: The range of cells that contain the conditions to meet

The following examples show how to use the **DCOUNT** function in practice with the following dataset in Excel that contains information about various basketball players:

**Example 1: Use DCOUNT with One Condition**

Suppose we would like to count the number of cells that contain numbers in the “Rebounds” column where the value in the “Team” column is Mavs.

We can type our criteria into the range **A2:D3** and then use the following formula with the **DCOUNT** function in cell **G2**:

=DCOUNT(A5:D16, "Rebounds", A2:D3)

The following screenshot shows how to use this formula in practice:

The formula returns a value of **3**.

This tells us that there are **3** cells that contain numbers in the “Rebounds” column where the corresponding value in the “Team” column is Mavs.

**Example 2: Use DCOUNT with Multiple Conditions**

Suppose we would like to count the number of cells that contain numbers in the “Rebounds” column where the following conditions are met:

- Value in “Team” column is Mavs
- Value in “Points” column is greater than 18
- Value in “Assists” column is greater than 5

We can type our criteria into the range **A2:D3** and then use the following formula with the **DCOUNT** function in cell **G2**:

=DCOUNT(A5:D16, "Rebounds", A2:D3)

The following screenshot shows how to use this formula in practice:

The formula returns a value of **2**.

This tells us that there are **2** cells that contain numbers in the “Rebounds” column where each of the three conditions we specified are met.

**Additional Resources**

The following tutorials explain how to perform other common tasks in Excel:

Excel: Count One Column if Another Column Meets Criteria

Excel: Count Number of Matches Between Two Columns

Excel: Count Filtered Cells with Text