What AVERAGEIF does
AVERAGEIF calculates an average only for the values that match one condition. It is useful when a single summary number should ignore rows that do not meet your rule.
Practical examples
Average sales for one region
=AVERAGEIF(B2:B20,"West",C2:C20)
This averages the values in column C only for rows where column B equals West.
Average values above a threshold
=AVERAGEIF(C2:C20,">=1000")
When average_range is omitted, Excel averages the cells in the tested range itself.
Common mistakes and notes
Criteria with operators need quotes
Expressions such as ">=1000" or "<50" must be entered as text. Without quotes, Excel will not interpret the condition correctly.
range and average_range should align
If the criteria range and the values to average do not line up row for row, the result can be misleading.
Blank and text values are ignored in the average
AVERAGEIF only averages numeric cells from the matching records. Text labels in the average range do not contribute to the result.