Documentation/Calc Functions/DGET/en

Function name:
DGET

Category:
Database

Summary:
DGET returns the contents of the cell (field) of the specified column, for the single row (database record) that matches the specified search criteria.

Syntax:
DGET(Database; DatabaseField; SearchCriteria)

Returns:
Returns the content of the cell satisfying the specified criteria, which may be numeric or non-numeric.

Reports Err:502 (invalid argument) if multiple matches are found, or a #VALUE! error (wrong data type) if no matches are found. A #VALUE! error is also reported if a single match is found but the relevant cell is empty.

Arguments:

 * In case of an error, the function returns either #VALUE! for no row found, or Err502 for more than one cells found.

Examples:
The content of cells A12:E12 should be identical to the header labels for the database table in cells A1:E1. Make sure that cells A13:E13 are blank, except for cell C13 which should contain "11" (this search criterion will match records in the database table that have a value of 11 in the Age column).

Many more examples of both search criteria and function calls can be found in this [[Media:Calc_Database_Functions_Examples.ods | Calc spreadsheet]].

Related LibreOffice functions:
DAVERAGE

DCOUNT

DCOUNTA

DMAX

DMIN

DPRODUCT

DSTDEV

DSTDEVP

DSUM

DVAR

DVARP

ODF standard:
Section 6.9.5, part 2

Equivalent Excel functions:
DGET