The AVERAGEIFS() function was new in Excel 2007.
Definition. This function returns the average of all cells that meet several criteria.
average_range (required). One or more cells to average, including numbers, names, arrays, or references that contain numbers
criteria_range1 (required). The range in which to evaluate the associated criteria
criteria1 (required). The criteria in the form of a number, an expression, a cell reference, or text that defines which cells will be averaged
criteria_range2 (optional). At least one and up to 127 ranges containing the criteria to be evaluated
criteria2 (optional). At least one and up to 127 criteria ...