DGET function in Excel
Extracts from a database a single record that matches the specified criteria
=DGET(database, field, criteria)DGET syntax and parameters
Three arguments, three required.
- databaserangeRequired
The range of cells that makes up the list or database. A database is a list of related data in which rows of related information are records, and columns of data are fields. The first row of the list contains labels for each column.
- fieldanyRequired
Indicates which column is used in the function. Enter the column label enclosed between double quotation marks, such as "Age" or "Yield," or a number (without quotation marks) that represents the position of the column within the list: 1 for the first column, 2 for the second column, and so on.
- criteriarangeRequired
The range of cells that contains the conditions that you specify. You can use any range for the criteria argument, as long as it includes at least one column label and at least one cell below the column label in which you specify a condition for the column.
DGET examples
Formulas you'll actually reuse.
The single rep matching the criteria — works only when exactly one row matches:
=DGET(A1:E200, "Rep", G1:H2)Result
"Maria Lopez"The Amount of one order pinned down by Rep AND Product criteria in J1:K2:
=DGET(A1:E200, 4, J1:K2)Result
9800
DGET in Google Sheets
Same name — your formula ports as-is.
Try DGET in the playground
Edit the example — nothing to install.
Preloaded with the DGET formula from Example 1 — change anything and watch it respond.
DGET errors
What they mean — and the fixes.
#NUM!More than one record matches the criteria — tighten the criteria until only one row qualifies.
#VALUE!No record matches the criteria — check the header text in the criteria range matches the table exactly.
Related functions
More ways Excel gets this done.
- DAVERAGEReturns the average of selected database entriesDatabaseGoogle Sheets
- DCOUNTCounts the cells that contain numbers in a databaseDatabaseGoogle Sheets
- DCOUNTACounts nonblank cells in a databaseDatabaseGoogle Sheets
- DMAXReturns the maximum value from selected database entriesDatabaseGoogle Sheets
- DMINReturns the minimum value from selected database entriesDatabaseGoogle Sheets
- DPRODUCTMultiplies the values in a particular field of records that match the criteria in a databaseDatabaseGoogle Sheets