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.
The function for DCOUNT is:
DCOUNT(database, field, criteria)
Follow the steps below to easily use DCOUNT in Google Sheets.
Ensure your dataset is organized in Google Sheets with the headers: Employee ID, Name, Department, and Salary.
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.
In an empty cell where you wish to display the result, begin your formula with =DCOUNT(.
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,.
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.
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.