How to Use DCOUNT vs DCOUNTA Function in Excel + Tips (Video in Khmer)
Learn how to use DCOUNT and DCOUNTA function in Excel step-by-step to count numbers in a table database matching specific conditions.
Hello everyone! Today i will show you how to use DCOUNT and DCOUNTA function in Microsoft Excel step by step.
What is DCOUNT and DCOUNTA Function in Excel?
Both DCOUNT and DCOUNTA are Database formulas in Excel that help you count records in a table column based on specific criteria range condition:
DCOUNT: Help you count cells that contain NUMBERS ONLY in a database column that match your criteria.DCOUNTA: Help you count cells that are NOT EMPTY (counts numbers, text, words, and logic) in a database column that match your criteria.
Unlike standard COUNT or COUNTA, DCOUNT and DCOUNTA use a separate criteria table box with headers, which make complex filtering super easy!
📚 Related Tutorial: Want to add up numbers in database table instead? Check out How to Use DSUM Function in Excel!
🛠️ Formula Syntax
=DCOUNT(database, field, criteria)
=DCOUNTA(database, field, criteria)
database: The full range of cell table including header titles (example:A1:C6).field: Column header name in quotes (example:"Sales") or column index number (example:3) you want to count.criteria: The cell range containing header titles and criteria condition rules (example:E1:F2).
📋 Sample Data Table (Follow Along)
To test DCOUNT and DCOUNTA easily, create this main database table in range A1:C6:
| Row | Column A (Salesperson) | Column B (Region) | Column C (Sales) |
|---|---|---|---|
| 1 | Salesperson | Region | Sales |
| 2 | Sok | North | $500 |
| 3 | Dara | South | Pending (Text) |
| 4 | Lina | North | $800 |
| 5 | Sam | South | $600 |
| 6 | Sopheap | North | (Blank cell) |
Criteria Table Setup (Range E1:F2)
Create your criteria box in cell range E1:F2 with identical headers:
| Row | Column E (Region) | Column F (Salesperson) |
|---|---|---|
| 1 | Region | Salesperson |
| 2 | North |
📊 Simple Examples
Example 1: DCOUNT - Count Numeric Sales in North Region
In criteria box E1:F2, put "North" under Region (Cell E2):
=DCOUNT(A1:C6, "Sales", E1:F2)
👉 Calculation: Checks North region (Sok: $500, Lina: $800, Sopheap: Blank). Only $500 and $800 are numbers.
👉 Result: 2 (Blank cell Sopheap is ignored).
Example 2: DCOUNTA - Count Non-Empty Sales in South Region
Change criteria box E2 to "South":
=DCOUNTA(A1:C6, "Sales", E1:F2)
👉 Calculation: Checks South region (Dara: "Pending", Sam: $600). DCOUNTA counts both text and numbers!
👉 Result: 2
Example 3: Key Difference - DCOUNT vs DCOUNTA on Text Column
If you try to count Salesperson column for North region (E2 = "North"):
=DCOUNT(A1:C6, "Salesperson", E1:F2)
👉 Result: 0 (Because Salesperson column contains text names, not numbers!).
=DCOUNTA(A1:C6, "Salesperson", E1:F2)
👉 Result: 3 (Counts Sok, Lina, Sopheap because all 3 cells have text names!).
⚡ DCOUNT vs DCOUNTA Comparison
| Feature | DCOUNT | DCOUNTA |
|---|---|---|
| Counts Numbers | Yes | Yes |
| Counts Text & Words | No (Returns 0) | Yes |
| Counts Blank Cells | No (Ignored) | No (Ignored) |
| Best Used For | Counting numeric data (prices, sales, quantities) | Counting any non-empty data (names, status text) |
📹 Video Tutorials in Khmer
How to Use DCOUNT Function in Excel (Video in Khmer)
How to Use DCOUNTA Function in Excel (Video in Khmer)
💡 Quick Tips for DCOUNT & DCOUNTA Functions
- Use
DCOUNTAfor Text Columns:DCOUNTonly counts numbers! If you want to count names, codes, or text status, always useDCOUNTA.- Headers Must Match Exactly: Header titles in your criteria box (like
"Region"or"Sales") must match main database headers exactly!- Avoid Empty Criteria Rows: If your criteria range selection includes a blank row,
DCOUNTandDCOUNTAwill check ALL rows in the entire database table!- Use Column Index Number: Instead of typing text
"Sales", you can use column index number3(example:=DCOUNT(A1:C6, 3, E1:F2)).
📚 Related Resources & Tutorials
Related Tutorials
Opens in new tab ↗How to Use COUNTIF and COUNTIFS Function in Excel (Video in Khmer)
Learn how to use COUNTIF and COUNTIFS function in Excel step-by-step with simple examples and videos in Khmer.
How to Use DAVERAGE Function in Excel + Tips (Video in Khmer)
Learn how to use DAVERAGE function in Excel step-by-step to find the average numbers in a table database matching specific conditions.
How to Use DSUM Function in Excel + Tips (Video in Khmer)
Learn how to use DSUM function in Excel step-by-step to sum numbers in a table database matching specific conditions.