DAVERAGE Function
Averages the values in a database column for rows that meet the criteria.
Syntax
Parameters
| Parameter | Description | Required |
|---|---|---|
| database | The range containing the database, including the header row as the first row. | Required |
| field | The column to average, given as the column label in quotes (e.g. "Yield") or its 1-based column index. | Required |
| criteria | The range with a header row matching database column names and one or more condition rows; only matching records are averaged. | Required |
Basic Example
Average the Yield of apple trees taller than 10
=DAVERAGE(A1:E7, "Yield", A9:B10)The criteria A9:B10 (Tree=Apple, Height>10) matches two rows with Yield 14 and 10; the mean is (14+10)/2 = 12.
Advanced Examples
Example 1: Average a different column
Average Profit for the same matching treesChange only the field to Profit (column 5).
=DAVERAGE(A1:E7, "Profit", A9:B10)Example 2: Single matching record
Average Yield for cherry treesWith criteria Tree=Cherry, only one record matches, so the average equals that value.
=DAVERAGE(A1:E7, "Yield", A9:A10)How DAVERAGE Works
DAVERAGE filters the database to rows matching the criteria, sums the numeric values in the specified field, and divides by the count of those numeric values. Text and blank cells in the field are excluded from both the sum and the count.
Important Notes & Limitations
Only numeric values in the field are considered; text and blanks are ignored.
If no records match, DAVERAGE returns the #DIV/0! error.
Criteria header labels must exactly match database headers.
Common Errors & Fixes
#DIV/0!No records matched the criteria, so the count of numeric values was zero.Fix: Check the criteria so at least one record matches, or verify header spelling.
#VALUE!The field was an unquoted column name.Fix: Wrap the field name in quotes, e.g. "Yield", or use the column index.
Download Practice File
DAVERAGE
daveragePractice DAVERAGE with Real Data
Download a sample CSV file with pre-populated data and practice exercises for the DAVERAGE function. Works in both Excel and Google Sheets.
File format: CSV (comma-separated values) - opens in Excel, Google Sheets, and all spreadsheet apps