DCOUNT Function
The DCOUNT function in Google Sheets counts the number of cells that contain numeric values in a specified field of a database that meet given criteria.
Syntax
DCOUNT(database, field, criteria)
database
: The range of cells that make up the database.field
: The column number or header name containing the numeric values to count.criteria
: The range of cells that contain the conditions for counting.
Examples
- Basic Example
Count numeric values in field 3 of the database A1:C10 where criteria are in E1:E2:
=DCOUNT(A1:C10, 3, E1:E2)
- Using Header Names
Count numeric values in the ‘Quantity’ column where criteria are in G1:G2:
=DCOUNT(A1:C10, "Quantity", G1:G2)
Notes
- Ideal for counting numeric entries that meet specific conditions.