The AVERAGEIF formula in Excel is used to calculate the average of cells that meet a specific condition or criteria. It is helpful when you want to find averages only for certain values within a data range.
AVERAGEIF(range, criteria, [average_range])
Parameters:
Consider the following data of student scores in an Excel sheet:
Student | Score |
---|---|
Alice | 85 |
Bob | 92 |
Charlie | 78 |
David | 89 |
Eva | 95 |
To calculate the average score of students who scored above 80, you can use the following formula:
=AVERAGEIF(B2:B6, ">80")
This formula will return the average of scores that are greater than 80. The result will be:
90.25
If you want to calculate the average for specific students, such as all students whose names start with "A", use:
=AVERAGEIF(A2:A6, "A*", B2:B6)
This formula will look for names starting with "A" in the A2:A6 range and calculate the average of their corresponding scores in B2:B6.
">80"
" or ""A*"
".The AVERAGEIF formula is a powerful tool for calculating averages based on specific criteria. Whether you're analyzing student scores, financial data, or any other set of information, mastering this formula can help you quickly extract meaningful insights.