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.

Advertisement
Formula
=DCOUNT(database, field, criteria), =DCOUNTA(database, field, criteria)

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:

RowColumn A (Salesperson)Column B (Region)Column C (Sales)
1SalespersonRegionSales
2SokNorth$500
3DaraSouthPending (Text)
4LinaNorth$800
5SamSouth$600
6SopheapNorth(Blank cell)

Criteria Table Setup (Range E1:F2)

Create your criteria box in cell range E1:F2 with identical headers:

RowColumn E (Region)Column F (Salesperson)
1RegionSalesperson
2North

📊 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!).

Advertisement

⚡ DCOUNT vs DCOUNTA Comparison

FeatureDCOUNTDCOUNTA
Counts NumbersYesYes
Counts Text & WordsNo (Returns 0)Yes
Counts Blank CellsNo (Ignored)No (Ignored)
Best Used ForCounting 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

  1. Use DCOUNTA for Text Columns: DCOUNT only counts numbers! If you want to count names, codes, or text status, always use DCOUNTA.
  2. Headers Must Match Exactly: Header titles in your criteria box (like "Region" or "Sales") must match main database headers exactly!
  3. Avoid Empty Criteria Rows: If your criteria range selection includes a blank row, DCOUNT and DCOUNTA will check ALL rows in the entire database table!
  4. Use Column Index Number: Instead of typing text "Sales", you can use column index number 3 (example: =DCOUNT(A1:C6, 3, E1:F2)).

📚 Related Resources & Tutorials

Found this tutorial helpful? Share it with colleagues:
📚

Related Tutorials

Opens in new tab ↗
Advertisement