Excel Function
AVERAGEIF
Returns average for values matching a condition.
AVERAGEIF(range, criteria, [average_range])Arguments
range
RequiredSpecify the range used for condition check or aggregation.
criteria
RequiredEnter the match condition, e.g. "Food", ">=80", "<>0".
average_range
OptionalSpecify the range of values to average.
Practice Preview
calculate average sales for matching rows. Use AVERAGEIF to Returns average for values matching a condition. For range arguments, drag from the start cell to the end cell in the same argument field, or click start and end cells in order. For criteria, enter a match condition such as "text condition", ">=number", or "<>blank". use "食品" for criteria. Fill the argument fields below and complete a formula that achieves this goal.
Sample correct formula
=AVERAGEIF(C2:C8, "食品", D2:D8)