[ResponsiveRect]
How many boxes of a particular item do we have in stock?
Criteria Range Is C23:F24
DATABASE FORMULA – DGET Function
What Does It Do ?
This function examines a list of information and produces one result.
If more than one record matches the criteria the error #NUM is shown.
If no records match the criteria the error #VALUE is shown.
Syntax
=DGET(DatabaseRange,FieldName,CriteriaRange)
Description For DMIN Function
- The DatabaseRange is the entire list of information you need to examine, including the field names at the top of the columns.
- The FieldName is the name, or cell, of the values to Get, such as “Value Of Stock” or I3.
- The CriteriaRange is made up of two types of information.
The first set of information is the name, or names, of the Fields(s) to be used as the basis for selecting the records, such as the category Brand or Wattage.
The second set of information is the actual record which needs to be selected, such as Horizon as a brand name, or 100 as the wattage.
Formatting
No special formatting is needed.
[ResponsiveRect]
Examples 1
This example extracts information from just one record.
How many boxes of a particular item do we have in stock?
Criteria Range Is C51:F52
The number in stock is : =DGET(B3:I19,H3,C51:F52)
Examples 2
This example extracts information from multiple records and therefore shows the #NUM error.
How many boxes of a particular item do we have in stock?
Criteria Range Is C63:F64
The number in stock is : =DGET(B3:I19,H3,C63:F64)
Examples 3
This example extracts information from no records and therefore shows the #VALUE error.
How many boxes of a particular item do we have in stock?
Criteria Range Is C64:F65
The number in stock is : =DGET(B3:I19,H3,C64:F65)
Examples 4
This example uses the =IF() function to display a message when an error occurs.
How many boxes of a particular item do we have in stock?
Criteria Range Is C85:F86
The number in stock is : =DGET(B3:I19,H3,C85:F86)
=IF(ISERR(F88),CHOOSE(ERROR.TYPE(F88)/3,”No such product.”,”Duplicates products found.”),”One product found.”)
Advanced Excel Formulas Index