DGET

Formulas / DGET
Retrieve a single value from a record using criteria.
=DGET(database,field,criteria)
  • Database - Range of cells that includes the field headers
  • Field - Name or index of the field to get a maximum value from
  • Criteria - Range of cells that match the headers in the database

Examples

  • =DGET(A5:E11, "Yield", A1:F3)

    Let's say that we have a table of data (A5:E11) that contains a column for Yield. We want to find the value for Yield that meets certain conditions that are given in A1:F3. We can use the DGET function to do this.This function will return 10, because it is the only record that meets the conditions in A1:F3.

  • =DGET(A5:E11, "Yield", A1:F3, 6, 9)

    Using the same example as above, let's say that we want to find the value for Yield that meets certain conditions in A1:F3, but this time we want to limit the search to the rows 6-9 of the table (A5:E11). We can use the DGET function to do this by adding an optional parameter to the formula.This function will return 10, because it is the only record that meets the conditions in A1:F3 within the given row range.

  • =SUM(DGET(A5:E11, "Yield", A1:F3))

    Using the same example as above, let's say that we want to find the sum of the Yield values for all records that meet certain conditions in A1:F3. We can use the DGET function to do this by adding the SUM function to the formula.

Summary

The DGET function is a useful tool for retrieving a single value from a list or database by specifying certain conditions. It is a helpful way to quickly extract data.

  • The DGET function retrieves a single value from a field in a matching record and supports wildcards in the criteria.
  • The DGET function can extract values from multi-row criteria.
  • The DGET function throws an error if more than one record matches the criteria.


Frequently Asked Questions

What is the DGET function?
The DGET function is a function used to retrieve a value from a database. It has the syntax =DGET(database, field, criteria).
What is the first argument in the DGET function?
The first argument in the DGET function is the database.
What does the database argument specify?
The database argument specifies a table containing data.
What is the second argument in the DGET function?
The second argument in the DGET function is the field.
What does the field argument specify?
The field argument specifies the field from which we want to retrieve a value.
What is the third argument in the DGET function?
The third argument in the DGET function is the criteria.
What does the criteria argument specify?
The criteria argument specifies a table that contains conditions for selecting a result.
Sourcetable Logo

Work smarter

Al is here to help. Leverage the latest models to
analyze spreadsheets, enrich data, and create reports.

Drop CSV