DGET Function in Excel: Get the One Matching Value

DGET Function in Excel: Get the One Matching Value featured illustration

πŸ“Ž This article includes 1 downloadable practice file ↓

⏱ 2 min readUpdated 5 October 2026

DatabaseLevel: ExpertAvailable in: Excel 2007+

In this article
  1. Syntax
  2. Examples
  3. Example 1
  4. Common errors and fixes
  5. DGET in practice
  6. Where you will use it
  7. Worked example
  8. Mistakes people make
  9. Related functions
  10. Continue learning

DGET returns a single value from the row that matches β€” and, usefully, refuses to guess when more than one row matches.

Advertisement

Syntax

=DGET(database, field, criteria)
Argument What it means
criteria A small criteria range: header row copied from the data, conditions in the rows below. Same row = AND, separate rows = OR.

Examples

Example 1

=DGET(A1:F500, "Email", H1:I2)

Email for the customer matching both name and city.

Common errors and fixes

You see Why, and the fix
#NUM! More than one row matched β€” a built-in duplicate check.
#VALUE! Nothing matched.

DGET in practice

Where you will use it

  • Fetch exactly one value with complex criteria
  • Lookup with AND/OR conditions
  • Check that a match is unique

Worked example

Same database; DGET succeeds only when exactly one record matches.

CaseCriteriaFormulaResult
1Region = West=IFERROR(DGET(DB,"Sales",CHOOSE(A2,CritA,CritB,CritC)),"error "&ERROR.TYPE(DGET(DB,"Sales",CHOOSE(A2,CritA,CritB,CritC))))22000
2Region = North=IFERROR(DGET(DB,"Sales",CHOOSE(A3,CritA,CritB,CritC)),"error "&ERROR.TYPE(DGET(DB,"Sales",CHOOSE(A3,CritA,CritB,CritC))))error 6
3Customer = Zaidi=IFERROR(DGET(DB,"Sales",CHOOSE(A4,CritA,CritB,CritC)),"error "&ERROR.TYPE(DGET(DB,"Sales",CHOOSE(A4,CritA,CritB,CritC))))error 3

Results calculated in Excel.

Mistakes people make

MistakeWhat to do instead
More than one matchError 6 (#NUM!): make the criteria more specific
No matchError 3 (#VALUE!)

INDEX Β· MATCH

πŸ“š Part of the free Excel course: Beginner β†’ Expert Β· Try it in the Formula Lab or ask the AI Helper.

⚑ Interactive Practice Lab & Formula Tester:

Test formulas dynamically in our web formula laboratory or download the companion Excel workbook.

πŸ“Ž Practice files for this article

  • πŸ“—
    Practice workbook: Database (D…) functions6 tasks on realistic sales data β€” type your formula, the Check column turns green when it is right. Answers sheet included.
    ⬇ XLSX Β· 33 KB

Free to use for learning. Files with macros (.bas) are plain text β€” import them with Alt+F11 β†’ File β†’ Import File, and always test on a copy.

✨ Ask AI about this article

Stuck on a step? Ask a question and the AI answers using this article.

Free Β· AI can be wrong

Leave a Reply

Your email address will not be published. Required fields are marked *