Skip to main content

Excel DCOUNT Function

doc workday.intl function 1

If you want to follow along with this tutorial, please download the example spreadsheet.
doc workday.intl function 1

Description

The DCOUNT function counts the cells that contain numbers in a field of records in a databased which match the specified criteria.

Syntax and arguments

Formula syntax

DCOUNT(database, field, criteria)

Arguments

  • Database: Required, a range of cells that makes up the database including column labels.
  • Field: Required, the column which is used in the function. Can be directly type the column label enclosed with double quotation marks, such as “Price”, or a number that indicates the position of the column in the database, such as 1 for the first column. The field can be blank but cannot be ignored, such as DCOUNT(database,,criteria), it will count all matched items.
  • Criteria: Required, a range that contains the criteria that you want to count based on. The range must include one column label and one cell below the column label at least.

Return Value

The DCOUNT function returns a numeric value.

Remarks

1. You should better not place the criteria below the database, otherwise, adding new information to database will be inconvenient.

2. If you want to count the number of all items in the column of the database, leave a blank row under column label in the criteria range.

3. There can be multiple rows in the criteria range, the criteria in each row are joined with OR logic, the criteria in the same row are joined with AND logic.

4. If the field contains text or blank value, the cell will not be counted. If you want to count either of numbers and texts in the field, using DCOUNTA function.
doc workday.intl function 1

5. The database and criteria must have matched column labels.

6. DCOUNT supports wildcard in criteria, but it is not used as good as modern functions, please test carefully.

7. Default, the function is case insensitive.

Version

Excel 2003 or later

Usage and Examples

Example 1 one row criteria-AND logic

Supposing the database is in range B8:E16, the criteria are listed in range B4:E5, now to count the number of cells contain numbers based on the criteria, please use one of below formulas:

=DCOUNT(B8:E16,4,B4:E5) //take the forth column in the database as field

=DCOUNT(B8:E16,,B4:E5) //field is blank

=DCOUNT(B8:E16,"sale",B4:E5) //field is the column named sale

Press Enter key to get the result.
doc workday.intl function 1

Example 2 two or more row criteria-OR logic

Supposing the database is in range B9:E17, the criteria are listed in range B4:E6, now to count the number of cells contain numbers based on the criteria, please use one of below formulas:

=DCOUNT(B9:E17,4,B4:E6) //take the forth column in the database as field

=DCOUNT(B9:E17,,B4:E6) //field is blank

=DCOUNT(B9:E17,"sale",B4:E6) //field is the column named sale

Press Enter key to get the result.
doc workday.intl function 1

Example 3 using wildcard in criteria

Supposing the database is in range B8:E16, to count number of items whose name start with “a” Product, please enter *a under Product label in the criteria range, then use formula, see screenshot:
doc workday.intl function 1


Relative Functions:

  • Excel DAVERAGE Function
    The Excel DAEVARAGE function returns the average of values in a field of records in a list or database that match the specific criteria.

  • Excel DCOUNTA Function
    The DCOUNTA function counts the cells that in a field of records in a databased which match the specified criteria.

  • Excel DGET Function
    The DGET function counts the cells that in a field of records in a databased which match the specified criteria.


The Best Office Productivity Tools

Kutools for Excel - Helps You To Stand Out From Crowd

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates  |  Delete Blank Rows  |  Combine Columns or Cells without Losing Data  |  Round without Formula ...
Super VLookup: Multiple Criteria  |  Multiple Value  |  Across Multi-Sheets  |  Fuzzy Lookup...
Adv. Drop-down List: Easy Drop Down List  |  Dependent Drop Down List  |  Multi-select Drop Down List...
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  Compare Columns to Select Same & Different Cells ...
Featured Features: Grid Focus  |  Design View  |  Big Formula Bar  |  Workbook & Sheet Manager | Resource Library (Auto Text)  |  Date Picker  |  Combine Worksheets  |  Encrypt/Decrypt Cells  |  Send Emails by List  |  Super Filter  |  Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters ...)  |  50+ Chart Types (Gantt Chart ...)  |  40+ Practical Formulas (Calculate age based on birthday ...)  |  19 Insertion Tools (Insert QR Code, Insert Picture from Path ...)  |  12 Conversion Tools (Numbers to Words, Currency Conversion ...)  |  7 Merge & Split Tools (Advanced Combine Rows, Split Excel Cells ...)  |  ... and more

Kutools for Excel Boasts Over 300 Features, Ensuring That What You Need is Just A Click Away...

Description


Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)

  • One second to switch between dozens of open documents!
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Edge and Firefox.
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations