The DCOUNTA counts nonblank cells in a database. The DCOUNTA function field argument is optional; if the field option is absent, DCOUNTA will count all records in the database that matches the criteria. The formula for the DCOUNTA function is = DCOUNTA (database, field, criteria).
Syntax of DCOUNT and DCOUNTA Function
DCOUNT
Database: The range of cells that make up the database. A database is required.Field: implies which column is used in the function. The field is required.Criteria: The range of cells that contain the data you indicate. Criteria are required.
DCOUNTA
Database: The range of cells that make up the database. A database is required.Field: implies which column is used in the function. The field is optional.Criteria: The range of cells that contain the data you indicate. Criteria are required.
How to use DCOUNT Function in Excel
In this part of the tutorial, we want to find the number of persons whose age is under twenty. First, click the cell where you want to place your data, in the cell type the function =DCOUNT, then bracket. Inside the bracket, we are going to add the Database. The database will be the entire table, which is A1:C9. We will add the Field, which is Age because age is what we are looking for. Type “Age” use double quotation because you are using a word in the formula. Now, we are going to add the Criteria. We will use the mini table containing Age, less than twenty (see in the photo above) because we will count the number of persons under twenty; type E5:E6, then close the bracket.
Press Enter, you will see your result. DCOUNT only count cells that contain numbers. If you try to use the DCOUNT function using columns that contain letters but not a number, the result will be a Zero.
How to use DCOUNTA Function in Excel
In this section, we will use the DCOUNTA function to count how many persons in the table LastName is Johnson. Click the cell where you want to place your data in the cell type =DCOUNTA, then bracket. Inside the bracket, we are going to add the Database. The database will be the entire table, which is A1:C9. We will add the Field. Using the column LastName, in the table as the field, ensure that “LastName” is in a double quotation. We are going to Criteria, which is the data in the mini table (see photo). Type E5:E6. Close bracket.
Press Enter. You will see the Result. DCOUNTA counts cells that contain both numbers and letters. That’s it! Now read: How to use AVERAGEIF and AVERAGEIFS in Excel.