DCOUNTA

Formulas / DCOUNTA
Count matching records in a database using criteria and an optional field.
=DCOUNTA(database, field, criteria)
  • database - range of cells that include field headers
  • field - name or index of the field to which to count
  • criteria - range of cells with the same headers as in the database

Examples

  • DCOUNTA(B7:E14,"Color",B4:E5)

    The DCOUNTA function can be used to count the number of records in a database that meet certain criteria. For example this formula returns a count of how many records in the database have a color of "red" and a price greater than 10.

  • DCOUNTA(B7:E14,1,B4:E5)

    The DCOUNTA function can be used with a numerical argument instead of a string argument. For example, this formula also returns a count of how many records in the database have a color of "red" and a price greater than 10.

  • DCOUNTA(B7:E14,,B4:E5)

    The DCOUNTA function can also be used without any argument in the second argument position. For example, this formula also returns a count of how many records in the database have a color of "red" and a price greater than 10.


Summary

DCOUNTA is a function used to count values in a database that meet the criteria specified. It requires a database and criteria argument, while the field argument is optional.

  • The DCOUNTA function returns a numeric count of matching records, including both numeric and text values, and ignores empty cells.

Frequently Asked Questions

What is the DCOUNTA Function?
The DCOUNTA function is a database function used to count records in a specified database that meet specific criteria.
What are the Arguments of the DCOUNTA Function?
The DCOUNTA function requires a database argument and a criteria argument. The field argument is optional.
What is the Database Argument for the DCOUNTA Function?
The database argument is the range of cells that contains the data that you want to count.
What is the Field Argument for the DCOUNTA Function?
The field argument is the column used in the function. It is optional.
What is the Criteria Argument for the DCOUNTA Function?
The criteria argument is the criteria used to count the records. It is required.
Sourcetable Logo

Work smarter

Al is here to help. Leverage the latest models to
analyze spreadsheets, enrich data, and create reports.

Drop CSV