The Excel AVERAGEIF function is used to find the average value from a range of cells that meet certain criteria.
The syntax for the AVERAGEIF function is:
=AVERAGEIF(range, criteria, [average_range])
|The range of cells you want to test
|The criteria the records have to meet to be included
|The range of values to average. This is optional and if omitted the function will average the first range
The example below shows the AVERAGEIF function being used to find the average order amount by the company Carpet Kings.