Excel functions / Database

DCOUNT function

Counts the numbers in a column of a table for the rows that meet conditions written in cells.

Syntax

=DCOUNT(database, field, criteria)

Arguments

When to use it

DCOUNT counts the cells holding numbers in one column of a table, for the rows that meet conditions written in a criteria range. Leave the field out to count the matching rows.

Examples

  1. Ana's sales over 350

    ABCDE
    1RepSales
    2Ana>3502
    3
    4RegionRepSales
    5NorthAna1200
    6SouthBen800
    7NorthChloe900
    8WestAna400
    9NorthAna300

    In E2: =DCOUNT(A4:C9, "Sales", A1:B2) → 2

    Try this example

  2. Matching rows, field left out

    ABCDE
    1Region
    2North3
    3
    4RegionRepSales
    5NorthAna1200
    6SouthBen800
    7NorthChloe900
    8WestAna400
    9NorthAna300

    In E2: =DCOUNT(A4:C9, , A1:A2) → 3

    Try this example

Common mistakes

DCOUNT in other languages

Excel shows function names in its own language. In these languages it also puts a semicolon between arguments where English has a comma.

Translate a whole formula

Try DCOUNT in the playground

Related functions