|Stats: 283 members, 6,354 topics. Date: February 24, 2017, 6:34 am|
The DAVERAGE function in Excel lets you find the average, or mean, of a field for just the rows that match the criteria. For this example, you’ll work with a student database.
The figure shows a worksheet in which the average grade for each course has been calculated by DAVERAGE. For example, cell G22 shows the average grade for Masters of Philosophy. Here is the formula:
Each calculated average uses a different criteria area. Each area filters the result by a particular course. In all cases, the criteria area for the Teacher is left blank and, therefore, has no effect on the results.
For the sake of comparison, DAVERAGE is also used in cell G24 to show the overall average for all courses. Because a criterion is a required function argument, the calculation in cell G24 is set to look at an empty cell. None of the Class criteria cells is free, so the function looks to the Teacher criterion in cell G3. Because this cell has no particular teacher entered as a criterion, all of the records in the database are used to create this average — just what you want. Here is the formula in cell G24:
It doesn’t matter which field header you use in the criterion when you’re getting a result based on all records in a database. What does matter is that there is no actual criterion below the header.
Viewing this topic: 1 guest viewing this topic
TnLounge - Copyright © 2016 TnLounge. All rights reserved.
Contact us / How to post on TN
Follow TnLounge on Facebook and Twitter
Disclaimer: Every TnLounge member is solely responsible for anything that he/she posts or uploads on TnLounge.