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
database: The table, with its column labels in the first row.field: The column to work on: its label in quotes ("Profit") or its number counting from 1. Left empty, every matching row is counted.criteria: The conditions: a range with column labels in its first row and what to match below them.
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
Ana's sales over 350
A B C D E 1 Rep Sales 2 Ana >350 2 3 4 Region Rep Sales 5 North Ana 1200 6 South Ben 800 7 North Chloe 900 8 West Ana 400 9 North Ana 300 In E2:
=DCOUNT(A4:C9, "Sales", A1:B2)→ 2Matching rows, field left out
A B C D E 1 Region 2 North 3 3 4 Region Rep Sales 5 North Ana 1200 6 South Ben 800 7 North Chloe 900 8 West Ana 400 9 North Ana 300 In E2:
=DCOUNT(A4:C9, , A1:A2)→ 3
Common mistakes
- Text columns. DCOUNT counts numbers only. To count text entries, use DCOUNTA.
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.
- Czech: DPOČET
- Danish: DTÆL
- Dutch: DBAANTAL
- Finnish: TLASKE
- French: BDNB
- German: DBANZAHL
- Hungarian: AB.DARAB
- Italian: DB.CONTA.NUMERI
- Norwegian: DANTALL
- Polish: BD.ILE.REKORDÓW
- Portuguese (Brazil): BDCONTAR
- Portuguese (Portugal): BDCONTAR
- Russian: БСЧЁТ
- Spanish: BDCONTAR
- Swedish: DANTAL
- Turkish: VSEÇSAY