By Stephen L. Nelson, E. C. Nelson

The DGET function can be helpful when using Excel for database management. The DGET function retrieves a value from a database list according to selection criteria. The function uses the following syntax:

=DGET(database,field,criteria)

where database is a range reference to the Excel table that holds the value you want to extract, field tells Excel which column in the database to extract, and criteria is a range reference that identifies the fields and values used to define your selection criteria.

The field argument can be a cell reference holding the field name, the field name enclosed in quotation marks, or a number that identifies the column (1 for the first column, 2 for the second column, and so on).

Suppose that you want to find the batting average of the single eight-year-old softball player. To retrieve this information from the list, enter the following formula into cell F3:

=DGET(A1:C11,3,A14:C15)

This function returns the value 0.444 because that’s the eight-year-old’s batting average.

image0.jpg

By the way, if no record in your list matches your selection criteria, DGET returns the #VALUE error message. For example, if you construct selection criteria that look for a 12-year-old on the team, DGET returns #VALUE because there aren’t any 12-year-old players.

Also, if multiple records in your list match your selection criteria, DGET returns the #NUM error message. For example, if you construct selection criteria that look for a ten-year-old, DGET returns the #NUM error message because four ten-year-olds are on the team.