Skip to content
Google Sheets

DCOUNTA function in Google Sheets

Counts values, including text, selected from a database table-like array or range using a SQL-like query.

=DCOUNTA(database, field, criteria)

DCOUNTA syntax and parameters

Three arguments, three required.

  • databaserangeRequired

    The array or range containing the data to consider, structured in such a way that the first row contains the labels for each column's values.

  • fieldanyRequired

    Indicates which column in database contains the values to be extracted and operated on. field may either be a text label corresponding to a column header in the first row of database or a numeric index indicating which column to consider, where the first column has the value 1.

  • criteriarangeRequired

    An array or range containing zero or more criteria to filter the database values by before operating.

DCOUNTA examples

Formulas you'll actually reuse.

  1. West orders with a rep filled in — counts text too, unlike DCOUNT:

    =DCOUNTA(A1:E200, "Rep", G1:G2)

    Result47

  2. How many big West orders already have a Date (column 5):

    =DCOUNTA(A1:E200, 5, G1:H2)

    Result19

DCOUNTA in Excel

Same name — your formula ports as-is.

Try DCOUNTA in the playground

Edit the example — nothing to install.

Preloaded with the DCOUNTA formula from Example 1 — change anything and watch it respond.

Loading the editor…