In this article:

DCOUNT in Google Sheets (Easiest Way to Use It in 2024)

May 8, 2024

DCOUNT in Google Sheets

DCOUNT is a function in Google Sheets that counts the cells that contain numbers in a database using a specified condition. It's part of the database functions and is useful for querying and performing calculations on data that meets certain criteria.

DCOUNT Function in Google Sheets 

The function for DCOUNT is:

DCOUNT(database, field, criteria)

  • database: This is the range of cells that makes up the list or database. A database is a range of columns in which rows of related information are records, and columns are fields. The first row of the database is typically used for labeling columns.
  • field: Indicates which column is used in the function. The field can be specified either by the column label in the first row of the database or by the column's index number.
  • criteria: The range of cells that contains the conditions you specify. It includes one or more pairs of array headers and values. The function counts rows in the database that meet all of the conditions specified in the criteria range.

How to Use DCOUNT in Google Sheets

Follow the steps below to easily use DCOUNT in Google Sheets. 

1. Organize Your Data in a Structured Table

Ensure your dataset is organized in Google Sheets with the headers: Employee ID, Name, Department, and Salary.

dcount google sheets

2. Set Up a Criteria Range to Specify Your Search Conditions

Somewhere in your sheet, set up a criteria range. For our example, use two headers: Department and Salary. Below them, input "IT" and ">55000" to define our search for IT department employees earning over 55,000.

google sheets dcount

3. Start the DCOUNT Function in an Empty Cell for Results

In an empty cell where you wish to display the result, begin your formula with =DCOUNT(.

how to use dcount in google sheets

4. Specify Your Data Range as the First Argument in the DCOUNT Formula

For the database argument, select the range that includes your data and headers. Assuming your data is in A1:D10, your formula starts as =DCOUNT(A1:D10,.

dcount function in google sheets

5. Identify the Field to Count and Your Criteria Range

We're interested in counting based on Salary, so the field argument can either be the name "Salary" in quotes or its column index in our dataset, which is 4. Finally, select your criteria range. If you've set the criteria next to your dataset, for example, at G1:H2, complete your formula as =DCOUNT(A1:D10, "Salary", G1:H2). Press Enter to see the result.

6. Review the Count Result of Matching Records

After pressing Enter, the cell displays the count of IT department employees with salaries over 55,000 according to your criteria.

We hope that you now have a better understanding of what DCOUNT in Google Sheets is and how to use DCOUNT function in Google Sheets. If you enjoyed this article, you might also like our article on how to set up Google Sheets DCOUNTA or our article on how to do factorial in Google Sheets. 

If you want to know how to make Google Sheets landscape, we also suggest checking out our detailed guide. 

Get Google Sheets productivity and automation tips delivered straight to your inbox
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
We'll email you 1-3 times a week — and never share your information.
Get your copy of our free Google Sheets automation guide!
  • 27 pages of Google Sheets tips and tricks to save time
  • Covers pivot tables and other advanced topics
  • 100% free

Work less, automate more!

Use Lido to connect your spreadsheets to email, Slack, calendars, and more to automate data transfers and eliminate manual copying and pasting. View all use cases ->