Tutorial Excel DCOUNT Function

Learn how to use the DCOUNT function to sum values ​​in a column of data that match the criteria you specify.

These instructions apply to Excel 2016, 2013, 2010, Excel 2019 for Mac, Excel 2016 for Mac, Excel for Mac 2011, Excel for Office 365, and Excel Online.

  1. DCOUNT syntax and arguments
  2. Data Entry Tutorial
  3. Choice of criteria
  4. Database name
  5. Opening the DCOUNT Dialog
  6. Argument Completion
  7. Database function errors

DCOUNT syntax and arguments

The DCOUNT function is one of the Excel database functions. This group of functions is designed to simplify the summary of information from large data tables. They do this by returning specific information based on one or more criteria selected by the user.

The syntax for the DCOUNT function is:

=DCOUNT(database, field, criteria)

All database functions have the same three arguments:

  • Database : (required) Specifies a range of cell references that contain the database. Field names must be included in the scope.
  • Field : (required) Specifies which column or field will be used by the function in its calculations. Enter an argument by entering a field name in quotes, such as Radius, or enter a column number, such as 3.
  • criteria : (required) A list of cell ranges containing user-specified conditions. The range must contain at least one field name from the database and at least one other cell reference that specifies the condition being evaluated by the function.

In this example, DCOUNT is used to determine the total number of students enrolled in their first year of college.

Data Entry Tutorial

The tutorial does not include formatting steps. Information about sheet formatting options is available in this simple Excel formatting tutorial.

  1. Enter the data table as shown in the image above into the cells from D1 to F15.

  2. Leave a cell F5 empty. This is where the DCOUNT formula is located.

  3. The field names in cells D2 to F2 are used as part of the function argument criteria .

Choice of criteria

To make DCOUNT look at data for freshmen only, we enter the number 1 below the field name year on line 3.

  1. In a cell F3 enter criteria a .

  2. In a cell E5 enter title Total: to specify the information we are looking for with the DCOUNT.

Database name

Using a named range for large data ranges, such as a database, can not only make it easier to pass that argument into a function, but also avoid errors caused by incorrect range selection.

Named ranges are very useful if you often use the same range of cells in calculations or when creating charts or graphs.

  1. Highlight cells D6 to F15 on the sheet to select a range.

  2. Click the field named above column A on the worksheet.

  3. Enter Registration in the name field to create a named range.

  4. Press key Enter on the keyboard to complete your entry.

Opening the DCOUNT Dialog

The function’s dialog box provides an easy way to enter data for each of the function’s arguments.

Opening the dialog for a group of database functions is done by clicking the function wizard (fx) button next to the formula bar above the worksheet – see image above.

  1. Click on a cell F5 where the results of the function are displayed.

  2. Press the button Insert function .

  3. Enter DCOUNT in the function search box at the top of the dialog box.

  4. Press the button To go to find the function.

  5. The dialog should find the DCOUNT and list it in the “Select function” box.

  6. Click Okay to open the DCOUNT function dialog box.

The function dialog is not available in Excel Online. You can use the Insert Function button instead.

  1. Click on a cell F5 where the results of the function are displayed.

  2. Press the button Insert function .

  3. Select Everything in the Select category list.

  4. Scroll down to DCOUNT and click to select it.

  5. Click OKAY. The formula syntax and arguments are displayed.

Argument Completion

  1. Click on a line Database dialog box.

  2. Enter a name for the range registration in line.

  3. Click on a line Field dialog box.

  4. Enter field name “year” to a line. Make sure to put quotes.

  5. Click on a line criteria dialog box.

  6. Highlight cells D2 to F3 on the worksheet to enter a range.

  7. Click Okay to close the DCOUNT function dialog and end the function.

Type in Excel Online =DCOUNT(Registration, “Year”, D2:F3) manually in the formula bar.

Answer 3 should appear in cell F5 because only three entries (entry in rows 7, 10, and 13) show a student enrolled in the first year of their program.

Clicking cell F5 full function
=DCOUNT(registration, “Year”, D2:F3) appears in the formula bar above the worksheet.

If we want to know the total number of students, we can use the normal COUNT function, because we don’t need to specify criteria to limit what data is used by the function.

Database function errors

#Where the : Usually occurs when field names are not included in the database argument.

For the above example, make sure that the field names in cells D6:F6 are included in the named range Enrollment.

Leave a Reply

Your email address will not be published. Required fields are marked *