Count matching records in a database
=DCOUNTA(database, [field], criteria)
| Parameter | Description |
|---|---|
database |
Database range including headers. |
field |
[optional] Field name or index to count. |
criteria |
Criteria range including headers. |
Using the example above, you can count records where the color is "red" and price is > 10 with these formulas:
=DCOUNTA(B7:E14,"Color",B4:E5) // field by name
=DCOUNTA(B7:E14,1,B4:E5) // field by index
=DCOUNTA(B7:E14,,B4:E5) // field omitted