DAVERAGE Function
The DAVERAGE function in Google Sheets calculates the average of values in a specified field of a database that meet given criteria.
Syntax
DAVERAGE(database, field, criteria)
database
: The range of cells that make up the database.field
: The column number or header name containing the values to average.criteria
: The range of cells that contain the conditions for averaging.
Examples
- Basic Example
Average the values in field 2 of the database A1:C10 where criteria are in E1:E2:
=DAVERAGE(A1:C10, 2, E1:E2)
- Using Header Names
Average values in the ‘Sales’ column where criteria are in G1:G2:
=DAVERAGE(A1:C10, "Sales", G1:G2)
Notes
- Useful for analyzing subsets of data based on specific conditions.