DCOUNT函数对数据库中记录的字段或列中包含数字的单元格进行计数。如果字段选项不存在,DCOUNT将计算数据库中与条件匹配的所有记录。DCOUNT函数的公式是= DCOUNT (database, field, criteria)。
DCOUNTA对数据库中的非空白单元格进行计数。DCOUNTA函数(DCOUNTA)字段参数是可选的;如果字段选项不存在,DCOUNTA将计算数据库中与条件匹配的所有记录。DCOUNTA函数的公式是= DCOUNTA (database, field, criteria)。
DCOUNT和DCOUNTA 函数(DCOUNTA Function)的语法
DCOUNT
- 数据库(Database):构成数据库的单元格范围。需要一个数据库。
- Field:暗示函数中使用了哪一列。该字段是必需的。
- Criteria:包含您指定的数据的单元格范围。标准是必需的。
DCOUNTA
- 数据库(Database):构成数据库的单元格范围。需要一个数据库。
- Field:暗示函数中使用了哪一列。该字段是可选的。
- Criteria:包含您指定的数据的单元格范围。标准是必需的。
如何在 Excel 中使用 DCOUNT 函数
在本教程的这一部分中,我们要查找年龄在 20 岁以下的人数。
首先,单击要放置数据的单元格,在单元格中键入函数=DCOUNT,然后括号。
在括号内,我们将添加Database。数据库将是整个表,即A1:C9。
我们将添加Field,即Age因为我们正在寻找年龄。键入“年龄”(“Age”)使用双引号,因为您在公式中使用了一个词。
现在,我们将添加Criteria。我们将使用包含Age的迷你表,小于 20(见上图(see in the photo above)),因为我们将计算 20 岁以下的人数;键入E5:E6,然后关闭括号。
按Enter,您将看到结果。
DCOUNT只计算包含数字的单元格。
如果您尝试使用包含字母但不包含数字的列来使用DCOUNT函数,则结果将为(DCOUNT)Zero。
如何在Excel中使用(Excel)DCOUNTA 函数(DCOUNTA Function)
在本节中,我们将使用DCOUNTA函数来计算(DCOUNTA)LastName表中有多少人是Johnson。
单击(Click)要在单元格类型=DCOUNTA中放置数据的单元格,然后单击括号。
在括号内,我们将添加Database。数据库将是整个表,即A1:C9。
我们将添加Field。使用列LastName,在表中作为字段,确保“LastName”在双引号中。
我们要去Criteria,这是迷你表中的数据(见图(see photo))。键入E5:E6。闭合括号。
按Enter。您将看到结果。
DCOUNTA对同时包含数字和字母的单元格进行计数。
就是这样!
现在阅读:(Now read:) 如何在 Excel 中使用 AVERAGEIF 和 AVERAGEIFS(How to use AVERAGEIF and AVERAGEIFS in Excel)。
How to use DCOUNT and DCOUNTA Function in Excel
The DCOUNT function counts the cells that contain numbers in a field or column of records in a database. If the field option is absent, DCOUNT will count all records in the database that matches the criteria. The formula for the DCOUNT function is = DCOUNT (database, field, criteria).
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.