Get instant live expert help with Excel or Google Sheets
“My Excelchat expert helped me in less than 20 minutes, saving me what would have been 5 hours of work!”

#### Post your problem and you'll get expert help in seconds

Your message must be at least 40 characters
Our professional experts are available now. Your privacy is guaranteed.

# How to Use the Excel DCOUNT Function

Excel allows a user to count records from a database based on a given criteria, using the DCOUNT function. This step by step tutorial will assist all levels of Excel users in counting matching records from a database.

Figure 1. The result of the DCOUNT function

## Syntax of the DCOUNT Formula

The generic formula for the DCOUNT function is:

`=DCOUNT(database, field, criteria)`

The parameters of the DCOUNT function are:

• database – a table containing data
• field – a field which value we want to get
• criteria – a table containing conditions for selecting a result

While creating a criteria range, we must be sure to have the same header as in a database table.

## Setting up Our Data for the DCOUNT Function

Figure 2. Data that we will use in the DCOUNT example

Let’s look at the structure of the data we will use. Our database table consists of 3 columns: “Delivery Number” (column B), “Delivery Date” (column C) and “Amount” (column D). The database range is B2:D9. The criteria range is B11:B12 and has the same header as the database. In the cell F3, we want to get the count of records in the database for the selected criteria.

## Get the Count of Records Using the DCOUNT Function

In our example, we want to count how many records in the database have amount \$1,000. The result is in the cell F3.

The formula looks like:

`=DCOUNT(B2:D9, 3, B11:B12)`

The database is the B2:D9 range, containing the database. The parameter field is 3 as we want to apply criteria on the third column (“Amount”). The range B11:B12 is the criteria parameter, containing the conditions for data selection.

To apply the DCOUNT function, we need to follow these steps:

• Select cell F3 and click on it
• Insert the formula: `=DCOUNT(B2:D9, 3, B11:B12)`
• Press enter

Figure 3. Using the DCOUNT function to count matching records in the database

As we can see in Figure 3, rows 3 and 9 have amount \$1,000. Finally, the result in the cell F3 is 2.

Most of the time, the problem you will need to solve will be more complex than a simple application of a formula or function. If you want to save hours of research and frustration, try our live Excelchat service! Our Excel Experts are available 24/7 to answer any Excel question you may have. We guarantee a connection within 30 seconds and a customized solution within 20 minutes.