DCOUNTA |
DCOUNTA(database, field, criteria) |
Returns the number of numerical values in a column that satisfies multiple conditions (including logical values and text). |
database | The range of cells that make up the table or list. |
field | The column name or number indicating which column to use. |
criteria | The range of cells that contain the conditions. |
REMARKS |
* For an illustrated example refer to the Specifying Database Criteria page. * This function is identical to the DCOUNT function except that logical values, text and errors are included. * This function will only include logical values, text and errors once the criteria has been matched. * This function supports wildcards (? and *). * The "database" range of cells can be a single column. See Example 5. * The "database" range of cells must contain column headings in the first row. * If the "database" range refers to a cell inside a pivot table, this will refer to the data currently displayed in the pivot table. * The "field" can be a column label, a column number (left to right) or a cell reference. * The "field" label is not case sensitive. See Example 2. * If "field" is left blank, then #VALUE! is returned. * If the "field" column contains some text entries, then these are ignored. * The "criteria" must include at least one column heading and one cell below the column heading. * The "criteria" must be in a contiguous block of adjacent cells. * The "criteria" can be anywhere on the active sheet, although it is recommended not to put it below the data, in case more data is added later on. * If "criteria" is left blank, then #VALUE! is returned. See Example 18. * Make sure the "criteria" and "database" ranges do not overlap and that they are always separated by at least one blank row or column. * To perform an operation on an entire column in a database, enter a blank cell below the column heading in the "criteria" range. See Example 10. * If no rows match the criteria, then #DIV/0! is returned. See Example 15. * You can use the COUNT function to return the number of values. * You can use the COUNTA function to return the number of values including logical values, text and errors. * You can use the DCOUNT function to return the number of numerical values in a column that satisfies multiple conditions. * This is similar to DAVERAGE, DGET, DMAX, DMIN, DPRODUCT, DSTDEV, DSUM and DVAR functions. * For the Microsoft documentation refer to support.microsoft.com * For the Google documentation refer to support.google.com |
|
1 - How many "Qty" items are there when Date="Jan", using a field label. 2 - How many "Qty" items are there when Date="Jan", with the field label in uppercase. 3 - How many "Qty" items are there when Date="Jan", using a field number. 4 - How many "Cost" items are there when Date="Jan" or "Jun". 5 - How many "Qty" items are there when Qty<22. This uses a single column. 6 - How many "Qty" items are there when Qty<22 OR Qty>18. 7 - How many "Cost" items are there when Qty<22 AND Cost>20,000. The Cost for May is not included. 8 - How many "Qty" items are there when Cost>20,000. 9 - How many "Cost" items are there when Date="Jan", Qty<22 and Cost>20,000 OR when Date="Jun" and Qty>18. 10 - How many "Cost" items are there. Putting a blank cell below the column heading will refer to the entire column. All the values 11 - How many "Cost" items are there when Qty>18 and Cost has no criteria. 12 - How many "Cost" items are there for all the dates that start with the letter "J". 13 - If the "field" column does not contain any numbers, then #DIV/0! is returned. 14 - If the "criteria" you specify does not return any rows, then #DIV/0! is returned. The Cost for January was only 18,000. 15 - If the "field" does not match one of the column headings, then #VALUE! is returned. 16 - If the "criteria" only includes a column heading, then #VALUE! is returned. 17 - If the "criteria" refers to a single empty cell, then #VALUE! is returned. C19 is empty. 18 - If the "criteria" is left blank, then #VALUE! is returned. 19 - If the "database" range does not include column headings, then #VALUE! is returned. 20 - If the "database" range only includes column headings, then #VALUE! is returned. |
© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited Top