Note: The other languages of the website are Google-translated. Back to English

Excel DCOUNTA 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 DCOUNTA function counts the cells that in a field of records in a databased which match the specified criteria.

Syntax and arguments

Formula syntax

DCOUNTA(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 DCOUNTA(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 DCOUNTA 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. 4. If the field contains blank value or an error value, the cell will not be counted. If you want to count only numbers in the field, using DCOUNT function.
doc workday.intl function 1

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

6. 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:

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

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

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

Press Enter key to get the counted number.
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:

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

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

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

Press Enter key to get the counted number.
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 “g” and store 1, please enter *a under Product label and 1 under Store label, 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

Would you like to complete your daily work quickly and perfectly? Kutools for Excel brings

300
 powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) and save
80%
time for you.

  • Designed for
    1500
    work scenarios, helps you solve
    80%
     Excel problems.
  • Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands.
  • Become an Excel expert in 3 minutes. No longer need to remember any painful formulas and VBA codes.
  • 30
    -day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years.
Ribbon of Excel (with Kutools for Excel installed)

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, Firefox, And New Internet Explorer.
Screen Shot of Excel (with Office Tab installed)
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Leave your comments
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations

Follow Us

Copyright © 2009 - www.extendoffice.com. | All rights reserved. Powered by ExtendOffice. | Sitemap
Microsoft and the Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.
Protected by Sectigo SSL