Excel DGET Function
If you want to follow along with this tutorial, please download the example spreadsheet.
Description
The DGET function returns a single value in the given field of the database that matches the criteria.
Syntax and arguments
Formula syntax
Arguments
|
Return Value
The DCOUNTA function returns a numeric value.
Remarks
1. You should better not place the criteria below the database, otherwise, adding new information to database will be inconvenient.
2. If you want to count the number of all items in the column of the database, leave a blank row under column label in the criteria range.
3. There can be multiple rows in the criteria range, the criteria in each row are joined with OR logic, the criteria in the same row are joined with AND logic.
4. If there are more than one matched values, the formula returns error value #NUM!.
5. The database and criteria must have matched column labels.
6. Supports wildcard in criteria, but it is not used as good as modern functions, please test carefully.
7. Default, the function is case insensitive.
8. If there is no matched value found, it returns error value #VALUE!.
Version
Excel 2003 or later
Usage and Examples
Example basic usage
Supposing the database is in range B8:E16, the criteria are listed in range B4:E5, now to get the corresponding sale based on the criteria, please use the formula as this:
=DGET(B8:E16,4,B4:E5) //take the forth column in the database as field
=DGET(B8:E16,"sale",B4:E5) //field is the column named sale
Press Enter key to get the counted number.
Relative Functions:
-
Excel DAVERAGE Function
The Excel DAEVARAGE function returns the average of values in a field of records in a list or database that match the specific criteria.
-
Excel DCOUNTA Function
The DCOUNTA function counts the cells that in a field of records in a databased which match the specified criteria.
The Best Office Productivity Tools
Kutools for Excel - Helps You To Stand Out From Crowd
Kutools for Excel Boasts Over 300 Features, Ensuring That What You Need is Just A Click Away...

Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)
- One second to switch between dozens of open documents!
- Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
- Increases your productivity by 50% when viewing and editing multiple documents.
- Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Edge and Firefox.
