Database All versions ◉ 16 views

=DGET()

Extracts a single value from a column of a list or database that matches conditions that you specify.

Applies To: Excel for Microsoft 365Excel for Microsoft 365 for MacExcel 2024Excel 2024 for MacExcel 2021Excel 2021 for MacExcel 2019Excel 2016
=DGET(database, field, criteria)
Hover argument names in the table for details.
Output typeMixed
Popularity30 / 100
VolatileNo
Dynamic ArrayNo
📥 Download sample .xlsx — Coming soon ▦ Try in Playground Dedicated file for this function — safe & lightweight · sample data + live formulas
Share:

⬇ Download Sample Workbook

A dedicated .xlsx for =DGET() with Persian sample data & live formulas — open in Excel and practice.

  • Sheet “Sample” — data table + formula in place
  • Sheet “Guide” — syntax, arguments & tips from this page
  • Instant & secure (token + rate limit)
📥 Download DGET.xlsx — Coming soon ~ 8–12 KB · No macros

⇪ Share

Send this function to friends

🧠 🧠 Quiz this function

%d questions — syntax, example & errors — test yourself!

◧ Arguments

ArgumentTypeRequiredDescription
database Range Required The range of cells that makes up the list or database. A database is a list of related data in which rows of related information are records, and columns of data are fields. The first row of the list contains labels for each column.
field Any type Required Indicates which column is used in the function. Enter the column label enclosed between double quotation marks, such as "Age" or "Yield," or a number (without quotation marks) that represents the position of the column within the list: 1 for the first column, 2 for the second column, and so on.
criteria Range Required The range of cells that contains the conditions that you specify. You can use any range for the criteria argument, as long as it includes at least one column label and at least one cell below the column label in which you specify a condition for the column.

▣ Examples

خطای #NUM! را برمی‌گرداند چون بیش از یک رکورد با شرط مطابقت دارد (هر درخت سیب یا گلابی) =DGET(A4:E10, "Yield", A1:A3)
مقدار ۱۰ را برمی‌گرداند (بازده درخت سیب در سطر ۹) چون تنها رکوردی است که شرط A1:F3 را دارد =DGET(A4:E10, "Yield", A1:F3)

✦ Tips

  • You can use any range for the criteria argument, as long as it includes at least one column label and at least one cell below the column label for specifying the condition. For example, if the range G1:G2 contains the column label Income in G1 and the amount $10,000 in G2, you could define the range as MatchIncome and use that name as the criteria argument in the database functions.
  • Although the criteria range can be located anywhere on the worksheet, do not place the criteria range below the list. If you add more information to the list, the new information is added to the first row below the list. If the row below the list is not blank, Microsoft Excel cannot add the new information.
  • Make sure that the criteria range does not overlap the list.
  • To perform an operation on an entire column in a database, enter a blank line below the column labels in the criteria range.

⚠ Common Errors

#VALUE! If no record matches the criteria, DGET returns the #VALUE! error value.
Fix: Check the criteria values and the criteria range headers
#NUM! If more than one record matches the criteria, DGET returns the #NUM! error value.
Fix: شرط‌ها را دقیق‌تر کنید تا فقط یک رکورد باقی بماند، یا از تابع دیگری مانند DFILTER/DSUM استفاده کنید.

💬 Comments & Q&A 0 approved

🔒 Your comment will be published after review.

Share your thoughts — visible after admin approval

No comments yet — be the first!

✍️ Add comment / question

captcha
🔒 Your comment will be published after review.