AVERAGEIF
The AVERAGEIF function calculates the average of a range of cells that meet a specified condition. It is used to find the average of values in a range based on a given criterion.

Example explanation
Cell C4 uses the AVERAGEIF function to calculate the average score of students who scored above 50.
Syntax 🔗
=AVERAGEIF(range
, criteria
, [average_range
])
range | The range of cells that you want to evaluate. |
criteria | The criteria or condition that determines which cells to include in the average. |
average_range (Optional) | The actual range of cells to average. If omitted, the range specified in the 'range' argument is used for averaging. |
range | The actual range of cells for evaluation. |
About AVERAGEIF 🔗
The AVERAGEIF function in Excel helps you find the average of data points that meet specific conditions. You can easily calculate the average of values within a range by setting a condition or criteria. This is useful for data analysis and reporting, allowing you to identify average values that match specific filters or conditions.
To use AVERAGEIF, specify the cell range to evaluate and define the criteria for inclusion in the average calculation. Optionally, you can set a separate range for the calculation, giving you flexibility to meet your needs. AVERAGEIF works with both numeric and non-numeric datasets, providing a simple and precise tool for your data analysis.
In summary, AVERAGEIF is a reliable Excel function for calculating average values based on conditions. Whether you're analyzing sales figures or averaging measurements, AVERAGEIF simplifies your data analysis with its straightforward functionality.
Examples 🔗
If you have a list of test scores in cells A1:A10 and you want to find the average of scores that are greater than 70, you can use the AVERAGEIF formula:
=AVERAGEIF(A1:A10, ">70")
This formula calculates the average of scores greater than 70.
If you have a list of sales amounts in cells B1:B20 and a corresponding list of products in cells A1:A20, and you want to find the average sales amount for a specific product, such as 'Product A', you would use the AVERAGEIF formula:
=AVERAGEIF(A1:A20, "Product A", B1:B20)
This formula calculates the average sales amount for 'Product A'.
Notes 🔗
Ensure the criteria in the AVERAGEIF function match the data type and format of the range being evaluated. If you omit 'average_range', Excel uses 'range' for both evaluating criteria and averaging values.
Questions 🔗
If the specified criteria in AVERAGEIF does not match any cells in the range, the function returns the #DIV/0! error, indicating that a division by zero (no matching cells) has occurred.
Can the AVERAGEIF function handle criteria involving text-based comparisons?Yes, the AVERAGEIF function can handle criteria involving text-based comparisons, allowing for the calculation of the average based on specific text criteria or conditions within the given range.
Is it possible to use multiple criteria with the AVERAGEIF function?No, the AVERAGEIF function in Excel only supports a single criteria. For scenarios requiring multiple criteria, the AVERAGEIFS function or alternative methods may be employed.