DGET |
DGET(database, field, criteria) |
Returns the single value in a database column satisfying certain conditions. |
database | The range of cells that make up the database 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. * Any cells containing text, logical values or errors are NOT INCLUDED. See Example 15. * If more than one row meets the criteria, then #NUM! is returned. See Examples 11 and 12. * The "database" can be a cell reference or a named range. * The "database" range of cells must contain column headings in the first row. See Example 19. * 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 9. * If "field" is left blank, then #VALUE! is returned. See Example 20. * The "criteria" must include at least one column heading and one cell below the column heading. See Example 16. * If "criteria" is left blank, then #VALUE! is returned. See Example 21 * 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. * 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 line below the column labels in the "criteria" range. * If no rows match the criteria, then #VALUE! is returned. See Example 14. * It is possible to use the data from a pivot table. When the "database" range refers to a cell inside a pivot table, the calculation is only performed on the data currently displayed in the pivot table. * For the Microsoft documentation refer to support.microsoft.com * For the Google documentation refer to support.google.com |
|
1 - What is the "Age" of the person with the name "John" using a field label. 2 - What is the "Age" of the person with the name "John" using a field column. 3 - What is the "Salary" of the person with the name "John". 4 - What is the "Age" of the person with the name "James". 5 - What is the "Name" of the person who is 22 years old. 6 - What is the "Name" of the person with a salary between £24,000 and £25,000. 7 - What is the "Name" of the person with a salary between £12,000 and £24,000. 8 - What is the "Name" of the person with a salary less than £25,000. 9 - What is the "Name" of the person who is less than 18 years old. 10 - This is the same as 8 but with the field label in uppercase. 11 - What is the "Name" of the person with a salary between £18,000 and £25,000. 12 - What is the "Age" of the person with either the name "John" or the name "David". 13 - If the "criteria" refers to a range of empty cells, then #VALUE! is returned. 14 - If the "criteria" you specify does not return any rows, then #VALUE! is returned. 15 - If the matching value is an error value, then the corresponding error value is returned. 16 - If the "criteria" only includes a column heading, then #VALUE! is returned. 17 - If the "database" range only includes column headings, then #VALUE! is returned. 18 - If the "criteria" refers to a single empty cell, then #VALUE! is returned. 19 - If the "database" range does not include column headings, then #VALUE! is returned. 20 - If "field" is left blank, then #VALUE! is returned. 21 - If "criteria" is left blank, then #VALUE! is returned. 22 - If "field" does not match one of the column headings, then #VALUE! is returned. |
© 2023 Better Solutions Limited. All Rights Reserved. © 2023 Better Solutions Limited Top