The DGET function is used to extract a single value from a database based on a specific criteria. It is handy when you need to retrieve a specific piece of information from a database that meets certain conditions.


=DGET(Database, Field, Criteria)

Database Range of cells that make up the database including headers.
Field The column label or number that indicates which field to extract the data from.
Criteria Range of cells that specify the conditions that the data must meet to be included in the result. Each column in the criteria range represents a different field to match with each row providing the criteria for that field.

About DGET

Imagine you have a dataset in Excel that resembles a database, and you need to pinpoint a specific value that meets certain criteria. That's where the DGET function comes into play, acting as a helpful tool for extracting targeted information from your database with precision and ease. It allows you to delineate the database, define the field containing the desired information, and set criteria to filter the results effectively. This function proves invaluable when sifting through extensive datasets to uncover particular data points of interest, streamlining your data retrieval process effortlessly.


Suppose you have a database containing student details with columns for 'Name', 'Age', and 'Grade'. You want to retrieve the age of a student named 'Alice'. If 'Name' is in column A, 'Age' in column B, and 'Grade' in column C, the DGET formula would be: =DGET(A1:C100, 'Age', A1:A100='Alice')

Consider a database with sales records including 'Product', 'Salesperson', and 'Amount'. You aim to extract the sales amount for a specific product sold by 'John'. If 'Product' is in column A, 'Salesperson' in column B, 'Amount' in column C, and the criteria range is in H1:J2 with 'Product' criteria in H1 and 'Salesperson' criteria in H2, you would use the formula: =DGET(A1:C100, 'Amount', H1:J2)


How does the DGET function determine which single value to extract from the database?

The DGET function retrieves a single value from the database based on the specified 'Field' and 'Criteria'. It locates a unique match meeting all criteria conditions and returns the corresponding value from the designated field.

Can the DGET function handle multiple matches based on the provided criteria?

No, the DGET function aims to fetch a single value from the database that fulfills all the specified criteria. If there are multiple matches meeting the conditions, the function will return an error message to indicate that more than one entry satisfies the criteria.

Is it necessary for the criteria range to include all fields present in the database?

Yes, for accurate results, the criteria range should cover all relevant fields present in the database. Each column in the criteria range should align with a separate field in the database, ensuring that the conditions are applied correctly for data extraction.

Related functions