Count matching records in a database using criteria and a field.
- database - a range of cells that includes table headers
- field - the name or index of the field to which the count will be applied
- criteria - a range of cells that have the same headers as those in the database
=DCOUNT(A1:D7, "Age", A1:D2)
Formula Description Result Counts how many records in the dataset have a value in the Age field, based on the criteria specified in the range A1:D2. The age field, based on the criteria specified in the range A1:D2 is 6.
The DCOUNT function is a useful tool for counting cells in a list or database, requiring the first two arguments of database and field. An optional field argument can also be used to further refine the count.
- The DCOUNT function counts the number of records in a database that match the criteria specified.
- The database argument must include field headers.
- The field argument is the name or index of the field to be counted.
- The criteria argument is a range of cells with headers that match those in the database.
- DCOUNT only counts numeric values in the field when criteria matches.
Frequently Asked Questions
What is the DCOUNT function?
The DCOUNT function is a built-in Microsoft Sourcetable function that counts cells in a field (column) of records in a list or database.
What arguments are required for the DCOUNT function?
The DCOUNT function requires two arguments:
- the field argument, which is the range of cells used in the function, and
- the criteria argument, which is the range of cells containing the criteria.
What is the purpose of the field argument?
The field argument specifies the range of cells used in the DCOUNT function. It is required for the DCOUNT function to work.
What is the purpose of the criteria argument?
The criteria argument specifies the range of cells containing the criteria for the DCOUNT function. It is also required for the DCOUNT function to work.