How To Use The DGET Function In Excel

Here is how to use the DGET function in Excel:

You can download the workbook here to follow along.

The DGET function in Excel is a database function (denoted by beginning with the letter “D”) and is defined as a function that will “extract from a database a single record that matches the conditions you specify”. Note that it will only return a “single record”. This will be more evident as we progress.

The syntax for DGET is =DGET(database, field, criteria). In our example here:

DGET1

Database – A1:D11
Field – the column from which we want the formula to draw the result – D1 for Sales
Criteria – F1:G2 – the column headings must match that of the database exactly; you can have one or many criteria

By selecting Tom and Dodge as the criteria, the function returns the result of 326,336, which matches the data in cell D2:

DGET2

One concern you must keep in mind is if you have multiple results that match the criteria. In the next example, there are two rows that match the criteria of Tom & Dodge – rows 2 and 7. Note that DGET returns a #NUM! error. That’s because it can only return a SINGLE record as noted previously:

DGET3

Here is another example where an error is returned. In this case, row 2 shows Tom and Dodge, while row 7 shows Tommy and Dodge. But DGET found the reference of “Tom” within the name “Tommy” and considered it a match:

DGET4

So, the bottom line is that you need to be careful with how your data is structured in order to use the DGET function.

Good luck and Happy Excelling!

Related Post

Free Download!

Subscribe to Download Your FREE Copy of
"My 70+ Favorite Excel Keyboard Shortcuts" Today!

, , ,

No comments yet.

Leave a Reply