Counts the number of cells containing numbers in a database that match specified conditions.
Cú pháp
DCOUNT(database, field, criteria)Đối số
databasebắt buộc
The range of cells that makes up the list or database.
fieldbắt buộc
The column label or index number used in the function.
criteriabắt buộc
The range of cells that contains the specified conditions.
DCOUNT is a database function that counts numeric values in a column based on criteria you define. It is useful for filtering datasets and performing conditional counts without using complex array formulas.
=DCOUNT(A1:C10, "Age", E1:E2)→5Counts the number of entries in the 'Age' column where the criteria in E1:E2 are met.
Prepare your database
Ensure your data has headers and is organized in a table format.
Define criteria
Create a separate range that includes the header and the condition you want to filter by.
Apply the function
Enter the DCOUNT formula referencing your database, the target field, and the criteria range.
No, DCOUNT only counts cells that contain numeric values. Use DCOUNTA if you need to count non-empty cells regardless of content.