In this article:

How to Use the DGET Function in Google Sheets (2024 Update)

May 8, 2024

What Is DGET in Google Sheets?

The DGET function is used to extract a single value from a database table-like array or range based on a specified criterion. 

The DGET function follows this syntax:

DGET(database, field, criteria)

Here's a simple breakdown of the syntax:

database: This is your range of cells that makes up the database. Your database should have a row of labels on top, as DGET uses these labels to identify columns.

field: This indicates which column (by label name or index) from the database you want to retrieve a value from.

criteria: This is a range of cells that specifies the conditions the data must meet to be considered in the DGET function. The criteria range should include at least one column label and a cell below it with a condition for the data.

How to Use the DGET Function in Google Sheets

Below are the steps you can follow to use the DGET function in Google Sheets:

Step 1: Set Up Your Data

Suppose you have a small database of employees with their ID, Name, and Department in a Google Sheet like this:

dget google sheets

Step 2: Define Your Criteria

Let's say you want to find the name of the employee with ID 2. You'll need to set up a criteria range elsewhere in your sheet like this:

how to use the dget function in google sheets

Here, you're telling DGET to look for the record where the ID is 2.

Step 3: Use DGET

Now, you want to find Mary's department. Your DGET formula will look like this:

=DGET(A2:C5,F2,E2:E3)

google sheets dget
  • A2:C5 is the database.
  • F2 is the field you want to retrieve (Mary's department).
  • E2:E3 is where you've placed your criteria (ID = 2).

Additional Notes

Criteria Range Setup: Your criteria range should mimic the structure of your database headers for the fields you're including in the criteria.

Single Record: Ensure your criteria is specific enough to return a single record. DGET will return an error if the criteria match more than one record or no records at all.

Error Handling: If you get an error, double-check your criteria range and ensure you're using the correct labels and data types.

We hope that this article has helped you and given you a better understanding of how to use the DGET function in Google Sheets. If you enjoyed this article, you might also like our articles on how to use PERCENTRANK in Google Sheets and how to create a fillable form in Google Sheets.

Get Google Sheets productivity and automation tips delivered straight to your inbox
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
We'll email you 1-3 times a week — and never share your information.

Work less, automate more!

Use Lido to connect your spreadsheets to email, Slack, calendars, and more to automate data transfers and eliminate manual copying and pasting. View all use cases ->