Description Uses specified criteria to select records from a database, then counts the number of selected records. Can also count the number of selected records for which a specified field is not blank.
Note This is a database function, which has specific requirements that are different from most functions. For information and expanded argument descriptions, see "Database Functions".
Syntax DCOUNTA ( database, [field,] criteria)
Argument | Description |
---|---|
database | A reference to a range containing data that the function searches. |
[field] | Optional. The column within database that contains the data you want to count. The function will only count the selected records that have a number in field. If this argument is omitted, the function will count all selected records. |
criteria | A reference to a range containing search criteria. |
Examples This example uses the example database and criteria ranges shown in "Database Functions". This function returns 3:
DCOUNTA(A1:D8,"Salesperson",B10:B11)
See Also DAVERAGE, DCOUNT, DGET, DMAX, DMIN, DPRODUCT, DSTDEV, DSTDEVP, DSUM, DVAR, DVARP