Excel like a finance pro.
Database function
DGET
Returns the single value from a table that matches criteria, erroring if there is more than one.
When to use it
Returns the single value from a column for the one row matching the criteria. Errors if more than one row matches, which makes it a useful uniqueness check.
The shape of it
- Syntax
=DGET(database, field, criteria)
Worked examples
One match
=DGET(A1:E11,"Revenue",H1:H2) → 150
H2 holds "Gizmo" under a "Product" header: exactly one row.
Too many matches
=DGET(A1:E11,"Revenue",H1:H2) → #NUM!
With "West" as the criterion, three rows match.
No match
=DGET(A1:E11,"Revenue",H1:H2) → #VALUE!
With "Sprocket", nothing matches.
Worth knowing
- XLOOKUP or INDEX/MATCH are simpler for plain lookups.
- #NUM! is a feature: it tells you the key is not unique.
- Criteria can combine several columns.
Where it goes wrong
- #NUM! for multiple matches.
- #VALUE! for none.
Related
Learn the moves here — or let Wauvel run them on your numbers.
Meet your AI CFO →One CFO-grade Excel tip a week
A short, practical email for finance operators — functions, shortcuts, and the moves that save an afternoon. Free, unsubscribe anytime.