Extracts a single value from the specified column of the specified database that matches the specified criteria.
Syntax Copy Code |
---|
DGET( Database database, TextOrNumber field, Reference criteria ) → Any |
You can use any range for the criteria argument, as long as it includes at least one column label and at least one cell underneath the column label for specifying the condition.
The following table shows a small database for a grocery shop. Each record in the table contains information about one item. Above the database are several cells that contain the conditions used as the function criteria.
NAME | CATEGORY | PRICE | PRICE | |
| Beverages | >10 | <15 |
|
| Confections |
|
|
|
Name | Category | Weight | Qty | Price |
Blueberry Tea | Beverages | 400 | 12 | 12.50 |
Ipoh Cofee | Beverages | 500 | 20 | 18.00 |
Chocolade | Confections | 1250 | 10 | 22.45 |
Steeleye Stout | Beverages | 750 | 6 | 7.95 |
Scottish Longbreads | Confections | 450 | 8 | 11.50 |
Mascarpone | Dairy | 250 | 2 | 7.50 |
The following formula will return the price of the beverage with price between 10 and 15:
Formula Copy Code |
---|
=DGET(A4:E10,"Price",B1:D2) |
Function Reference
DAVERAGE Function
DCOUNT Function
DCOUNTA Function
DMAX Function
DMIN Function
DPRODUCT Function
DSTDEV Function
DSTDEVP Function
DSUM Function
DVAR Function
DVARP Function