- SpreadJS Overview
- Getting Started
- JavaScript Frameworks
- Best Practices
- Features
- SpreadJS Designer
- SpreadJS Designer Component
- SpreadJS Collaboration Server
- Touch Support
-
Formula Reference
- Formula Overview
-
Formula Functions
- Barcode Functions
- Compatibility Functions
- Database Functions
- Date and Time Functions
- Engineering Functions
- Financial Functions
- Information Functions
- Logical Functions
- Lookup and Reference Functions
- Math and Trigonometric Functions
- Statistical Functions
- Sparkline Functions
- Text Functions
- Web Functions
- RegEx Functions
- Other Functions
- Import and Export Reference
- Frequently Used Events
- API Documentation
- Release Notes
DGET
This function extracts a single value from a column of a list or database that matches the specified conditions.
Syntax
DGET( database, field, criteria )
Arguments
Argument | Description |
|---|---|
database | Range of cells that make up the database; cell range reference |
field | Column in the database, referred to by label or index |
criteria | Range of cells that specify which rows in the database are used; cell range reference |
The database argument is a range of cells that make up the database. Each column represents a field. The first row represents the field labels. Each remaining row represents a record of data.
The field argument determines which column in the database to use. The field argument can be a string (field label) or a number (field index).
The criteria argument is a range of cells that specify which rows in the database contain the conditions that select a subset of the data in the database. The first row represents field labels. The remaining rows represent conditions. Conditions in the same row are combined using an AND operation. Conditions in different rows are combined using an OR operation. Each condition can be a number or a string. The string can include a comparison operator (=, <>, <, >, <=, >=). If no operator is included then the equal operator (=) is assumed.
Wild card characters are not supported in the criteria argument.
Remarks
If no value matches the criteria argument, a #VALUE! error is returned. A #NUM! error is returned if more than one match is found.
This is one of several databases or list functions that treat a range of cells as if they were a database.
Data Types
Accepts cell ranges for database and criteria. Accepts a string or a number for the field. Returns numeric data.
Examples
DGET(A4:E10,"Type",A4:E10)
DGET(A1:A9,3,D5:D8)