This browser does not support basic Web standards, preventing the display of our site's intended design. May we suggest that you upgrade your browser?
Database functions can make your worksheet more useful by extracting information about the data in a form that will answer a question or help in deciding the best way to spend your resources. Whether in your office, school, or preparation for an important meeting, database functions can be an important way to analyze your information. For information on subtotals, refer to Calculating Subtotals in Databases.
All database functions use the same format for calculations. The format is the following:
Database
Refers to the range of cells that make up the database. This includes the row with the field names identifying the type of information in each column.
Field
Indicates which field will be analyzed and used in the function. The field can be referred to as the position number of the column or the field label within quotes.
Criteria
Criteria is the range of cells containing the conditions by which Excel will identify records to be evaluated to complete the function. Criteria must have a column label and at least one condition in the cell below its range. For more information, refer to Establishing Criteria.
Before performing a database function, you must create the criteria for the function. If you have not already established your criteria, refer to Establishing Criteria.
Windows:
Place the cursor in the cell where you want the results of the function to appear
On the Formula Bar, click INSERT FUNCTION![]()
The Insert Function dialog box appears.

From the Or select a category pull-down list, select Database
From the Select a function scroll list, select the appropriate function
Click OK
The Function Arguments dialog box appears.
Repeat steps a-d until all text boxes are completed
To perform the function, click OK
Macintosh:
Place the cursor in the cell where you want the results of the function to appear
On the Standard toolbar, click PASTE FUNCTION![]()
The Paste Function dialog box appears.
From the Function Category list, select Database
From the Function name scroll list, select the appropriate function
NOTE: A description of the selected function appears below the lists.
Click OK
The respective dialog box appears.
Repeat steps a-d until all text boxes are completed
To perform the function, click OK
For more information on how to perform any of these functions, refer to Performing a Database Function, which provides information on the Insert Function dialog box. The table in this section summarizes the most commonly used database functions and is based on the following Excel database:

| DSUM: Adds the numbers in the field column of records in the database that match the criteria. | |||||||||||||||||
|
|||||||||||||||||
| DAVERAGE: Averages the values in the field column of records in the database that match the criteria. | |||||||||||||||||
|
|||||||||||||||||
| DCOUNT: Counts the cells containing numbers that match the criteria in the field column of records in the database. | |||||||||||||||||
|
|||||||||||||||||
| DCOUNTA: Counts the cells containing non-numerical data that match the criteria in the field column of records in the database. | |||||||||||||||||
|
|||||||||||||||||
| DGET: Locates a single record matching the specified criteria and displays the results of the requested field. If multiple records meet the criteria, an error message will occur. | |||||||||||||||||
|
|||||||||||||||||
| DMAX: Returns the highest number for the field column of records matching the criteria. |
|||||||||||||||||
|
|||||||||||||||||
| DMIN: Returns the smallest number for the field column of records matching the criteria. | |||||||||||||||||
|