DAVERAGE function
Averages the values in one column of a list, using only the records that match conditions written in a separate criteria range.
Available in All versions of Excel, including Microsoft 365 and Excel for the web
In every Excel versionWorks in Google Sheets
Syntax
DAVERAGE(database, field, criteria)| Argument | What it means | |
|---|---|---|
database | Required | The whole list including its header row, e.g. A1:D7. |
field | Required | The column to average: its header in quotes ("Salary") or its position in the list (4). |
criteria | Required | A range with at least one header that matches a header in the list, and conditions underneath it. |
Returns: The average of the matching values in field.
How DAVERAGE works
DAVERAGE belongs to Excel's family of database functions (the "D" functions). They all work the same way: you point them at a list with headers, name the column you want to calculate on, and give them a small criteria range — a separate block of cells where you write the conditions under copies of the column headings. DAVERAGE then averages only the rows that pass the conditions.
The advantage over AVERAGEIFS is flexibility. Conditions on the same row of the criteria range must all be met (AND); conditions on different rows are alternatives (OR). Because the criteria live in cells, a manager can change the department or the threshold without touching the formula, which makes D-functions a good fit for small dashboards and what-if reports.
Text conditions in the criteria range match values that begin with the text, so Sales also matches Sales Support. Write ="=Sales" in the criteria cell when you need an exact match.
Examples
1Average salary in the Sales department
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Dept | Name | Years | Salary | ||
| 2 | Sales | Ana | 3 | 42000 | 42333.33 | |
| 3 | IT | Ben | 7 | 58000 | ||
| 4 | Sales | Carla | 5 | 46500 | ||
| 5 | IT | Dev | 2 | 49000 | ||
| 6 | HR | Eli | 9 | 51000 | ||
| 7 | Sales | Fay | 1 | 38500 | ||
| 8 | ||||||
| 9 | Dept | |||||
| 10 | Sales |
Result: 42333.33
The criteria range has the column heading in the first row and the condition underneath. The Sales staff earn 42,000, 46,500 and 38,500; their average is 127,000 / 3 = 42,333.33 (shown with two decimals).
2Average salary for staff with at least 5 years
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Dept | Name | Years | Salary | ||
| 2 | Sales | Ana | 3 | 42000 | 51833.33 | |
| 3 | IT | Ben | 7 | 58000 | ||
| 4 | Sales | Carla | 5 | 46500 | ||
| 5 | IT | Dev | 2 | 49000 | ||
| 6 | HR | Eli | 9 | 51000 | ||
| 7 | Sales | Fay | 1 | 38500 | ||
| 8 | ||||||
| 9 | Years | |||||
| 10 | >=5 |
Result: 51833.33
Here the field is given by position (4 = Salary). Ben, Carla and Eli have at least 5 years: (58,000 + 46,500 + 51,000) / 3 = 51,833.33.
Common errors and how to fix them
| Error | Why it happens | Fix |
|---|---|---|
#DIV/0! | No record matches the criteria, so there is nothing to average. | Check the criteria spelling, or wrap the formula in IFERROR. |
#VALUE! | The field name does not match any header in the list. | Copy the header text exactly, or use the column number. |
Tips
- Keep the criteria range away from the list (above it or on another sheet) so that adding records never overwrites it.
- An empty row inside the criteria range means "no condition" and matches every record — make the criteria range exactly as tall as your conditions.
Google Sheets
DAVERAGE also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.
DAVERAGE in other languages
In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.
| Language | Function name |
|---|---|
| Czech | DPRŮMĚR |
| Danish | DMIDDEL |
| Dutch | DBGEMIDDELDE |
| Finnish | TKESKIARVO |
| French | BDMOYENNE |
| German | DBMITTELWERT |
| Hungarian | AB.ÁTLAG |
| Italian | DB.MEDIA |
| Norwegian (Bokmål) | DGJENNOMSNITT |
| Polish | BD.ŚREDNIA |
| Portuguese (Brazil) | BDMÉDIA |
| Portuguese (Portugal) | BDMÉDIA |
| Russian | ДСРЗНАЧ |
| Spanish | BDPROMEDIO |
| Swedish | DMEDEL |
| Turkish | VSEÇORT |