The AVERAGEIF function is a built-in function in Microsoft Excel (and in other spreadsheet programs) that calculates the average of a range of values that meet a specified criteria. This function is useful for finding the average of a subset of values in a data set based on a specific condition.
The syntax for the AVERAGEIF function is as follows:
=AVERAGEIF(range, criteria, [average_range])
where range is the range of cells to evaluate, criteria is the condition that the cells must meet, and average_range is the optional range of cells to average.