Average ifs
AVERAGEIFS Function¶
The AVERAGEIFS function in Excel calculates the arithmetic mean (average) of all cells in a range that meet
multiple specified criteria. This function is particularly useful for finding the average of a subset of data that
matches specific conditions.
Syntax:¶
AVERAGEIFS(average_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)
- average_range: The range of cells to calculate the average from. These are the numbers for which you want to compute the average.
- criteria_range1: The range of cells to evaluate against the first condition.
- criteria1: The condition or criteria used to define which values in
criteria_range1are included in the calculation. - [criteria_range2, criteria2], ...: Optional additional ranges and their respective conditions. You can specify up to 127 conditions.
Key Points:¶
- All ranges (e.g.,
average_range,criteria_range1, etc.) must be the same size; otherwise, the function will return an error. - Criteria can include logical operators (
>,<,>=,<=,=,<>) and wildcards (*,?) for text-based conditions:*matches any sequence of characters.?matches a single character.
- If no cells meet the criteria,
AVERAGEIFSwill return the#DIV/0!error. - Logical values like
TRUEandFALSEare treated as numeric values (TRUE =1, FALSE =0) if used in the ranges.
Examples:¶
-
Basic Usage:
Calculates the average of cells in the rangeA1:A10where the corresponding cells inB1:B10are greater than5. -
Multiple Criteria:
Averages cells inA1:A10where values inB1:B10are greater than5and values inC1:C10are less than20. -
Using Wildcards for Text Criteria:
Calculates the average of cells inA1:A10where:B1:B10contains text starting with "John",C1:C10contains values greater than or equal to100.
-
Criteria with Dates:
Averages cells inA1:A10where the corresponding dates inB1:B10fall within the year 2023.
Notes:¶
- The
AVERAGEIFSfunction is an extension ofAVERAGEIF, allowing for multiple criteria instead of just one. - Unlike
SUMIFSorCOUNTIFS, theAVERAGEIFSfunction focuses on returning an average instead of a sum or count. - Make sure all ranges provided have the same number of rows and columns; otherwise, you will encounter a
#VALUE!error.
Tip: Use
AVERAGEIFSto generate advanced statistical insights, such as filtering data by conditions before calculating averages. It is a versatile function for handling conditional averaging in data analysis.