If you’re managing a sales database and want to extract specific information based on multiple conditions—DGET is your secret weapon. It allows you to pull one value from a structured database that matches your exact criteria.
Table of Contents
📌 What is the DGET Function?
DGET stands for Database GET. It’s used when you want to return a single value from a database where rows meet certain conditions.
Formula Syntax:
DGET(database, field, criteria)
🧾 Sample Sales Data
Salesman ID | Name | Product | City | Zone | Qty | Rate |
---|---|---|---|---|---|---|
S001 | Rajesh | Pen | Delhi | East | 50 | 10 |
S002 | Sandeep | Pencil | Mumbai | West | 80 | 5 |
S003 | Anjali | Notebook | Kolkata | East | 60 | 20 |
S004 | Kavita | Pen | Delhi | East | 100 | 10 |
🎯 Goal
You want to find the quantity (Qty) sold by Kavita in Delhi for Pen.
🧩 Step 1: Set Up Criteria Table
Create a criteria table that exactly matches the column headers:
Name | Product | City |
---|---|---|
Kavita | Pen | Delhi |
🧮 DGET Formula
Place your formula near the output cell:
excelCopyEdit=DGET(A1:G5, "Qty", I1:K2)
- A1:G5 is your full database range.
- “Qty” is the field (column header) from which you want to return the value.
- I1:K2 is your criteria table range.
⚠️ Important Notes
- Returns error
#NUM!
if more than one record matches the criteria. Ensure the conditions point to a single unique row. - Field name must exactly match the column heading (e.g., “Qty”).
- Works best when using structured and labeled datasets.
✅ Use Cases
- Extract sales numbers by region and salesperson
- Pull product rates based on city and category
- Use in dashboards for automated reporting