DAVERAGE
Database Functions:
Function: DAVERAGE() - Returns the average of selected database entries that match criteria.
Database
+--------+--------+-----+-------+--------+
| A | B | C | D | E |
+----+--------+--------+-----+-------+--------+
| 4 | Tree | Height | Age | Yield | Profit |
| 5 | Apple | 18 | 20 | 14 | 105 |
| 6 | Pear | 12 | 12 | 10 | 96 |
| 7 | Cherry | 13 | 14 | 9 | 105 |
| 8 | Apple | 14 | 15 | 10 | 75 |
| 9 | Pear | 9 | 8 | 8 | 76.8 |
| 10 | Apple | 8 | 9 | 6 | 45 |
+----+--------+--------+-----+-------+--------+
Criteria
+--------+--------+
| A | B |
+---+--------+--------+
| 1 | Tree | Height |
| 2 | =Apple | >10 |
+---+--------+--------+
The Average yield of Apple trees over 10' in height
=DAVERAGE(A4:E10,"Yield",A1:B2)
DAVERAGE() Result is 12
Criteria
+--------+
| A |
+---+--------+
| 1 | Tree |
| 2 | =Apple |
| 3 | =Pear |
+---+--------+
The Average age of all Apple and Pear trees in the orchard
=DAVERAGE(A4:E10,3,A1:A3)
DAVERAGE() Result is 12.8