Returns the average of a range depending on multiple criteria. Learn more
In Google Sheets, the AVERAGEIFS function is used to calculate the average of a range of values that meet multiple criteria or conditions. It allows you to specify one or more criteria ranges, along with their corresponding criteria, to filter the data for averaging.
Here is the syntax for the AVERAGEIFS function: AVERAGEIFS(averagerange, criteriarange1, criterion1, [criteria_range2, criterion2, …])
averagerange: This is the range of cells that contains the values you want to average. The function will consider these values for averaging. criteriarange1: This is the first range of cells that you want to evaluate against the first criterion. The function will check each cell in this range. criterion1: This is the condition or criterion that the cells in the first criteria range must meet. [criteria_range2, criterion2, …]: These are additional pairs of criteria ranges and criteria that you can include to further filter the data for averaging.
The AVERAGEIFS function calculates the average of only those values in the average range that meet all the specified criteria. Cells in the average range that correspond to blank cells or cells with logical values (TRUE/FALSE) in any of the criteria ranges are ignored.
Here's an example to illustrate the usage of AVERAGEIFS:
Suppose you have a list of sales amounts in cells A1 to A10, a corresponding list of salespersons' names in cells B1 to B10, and a list of product types in cells C1 to C10. You can use the AVERAGEIFS function to calculate the average sales amount for a specific salesperson and a specific product type. For example, if you want to calculate the average sales for "John" with the product type "Electronics," you can use the following formula:
=AVERAGEIFS(A1:A10, B1:B10, "John", C1:C10, "Electronics")
This formula will check the cells in the range B1:B10 for the criterion "John" and the cells in the range C1:C10 for the criterion "Electronics." It will average the corresponding sales amounts from A1:A10 for the cells that match both criteria.