Microsoft Office Tutorials and References

In Depth Information

**Using the DGET Function**

Very quickly and without complaint, Excel compares the 5,000 rows of your

database with this complex formula, and the DSUM produces the correct

value, as shown in
Figure 12.57
.

Figure 12.57.

Figure 12.57.
The formula version of the criteria range is rare but incred-

The formula version of the criteria range is rare but incred-

ibly powerful.

ibly powerful.

Using the

Using the
DGET

Function

The DGET function returns a single cell from a database. The problem is that

this function is picky. If your criteria range matches zero records, DGET re-

turns a #VALUE error. If your criteria range returns more than one row, DGET

returns a #NUM! error.

To have DGET work, you need to write a criteria record that causes one and

only one row to be evaluated as TRUE.

DGET
Function

Syntax

DGET(database,field,criteria)

The DGET function returns a single cell matching criteria from a data set.

This function takes the following arguments:

•
database

database
—
This is the range of cells that make up the list or data-

base. A databaseis 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.