AVERAGEIF Function

AVERAGEIF Function

AVERAGEIF Function

Calculate the average of values that match one condition. Useful when you want the mean for one category, threshold, or label.

ExcelClash Team
PUBLISHED

Summary

AVERAGEIF returns the average of values that meet one condition. It is useful when you do not want the mean for the whole dataset and only care about one group, one threshold, or one matching label.

That makes it a practical reporting function. Instead of filtering a list by hand and then averaging it, you can let one formula do both jobs at once. You tell Excel what to check, what rule to use, and which numbers should be averaged.

Purpose

Average with one condition

Finds the mean only for rows that match one rule.

Return Value

Number

Returns the average of matching values. If nothing matches, Excel returns #DIV/0!.

Syntax

=AVERAGEIF(range, criteria, [average_range])

range is the part Excel checks against your rule. criteria is the rule itself. average_range is the set of values to average if it is different from the checked range.

Arguments

  • range - [required] The cells Excel tests against the condition.
  • criteria - [required] The rule that decides which cells count. This can be text, a number, an expression like ">1000", or a cell reference.
  • average_range - [optional] The actual cells to average. If you leave it out, Excel averages the cells in range.

AVERAGEIF vs Other Functions

The difference mostly comes down to how many conditions you need and whether you want an average at all.

Function Main job Use it when
AVERAGEIF Average with one condition You only need one rule
AVERAGEIFS Average with multiple conditions You need two or more rules at the same time
AVERAGE Average everything You want the mean for the full list
SUMIF Sum with one condition You want the total instead of the mean

Using the AVERAGEIF Function

A common pattern is averaging one numeric column based on labels in another column. For example, you can average salaries where the department is "Sales", or average order values where the region contains the word "North". This keeps the formula readable even when the dataset grows.

Microsoft also notes a few details that help avoid mistakes. Criteria can be written as text, numbers, expressions, or cell references. That means rules like "Sales", 32, ">32", and B4 are all valid. If you omit average_range, Excel averages the matching cells from range itself.

Wildcards are useful when the text is not identical in every row. The asterisk * matches any sequence of characters, and the question mark ? matches a single character. That lets one formula catch values like North East and North West without listing each one separately.

Example 1 - Average salaries for Sales

Here the condition is a text label, so Excel checks the department column and averages the matching salary values.

=AVERAGEIF(A1:A3,"Sales",B1:B3) // Averages only the Sales rows.
Check Answer
Challenge #1
Target: Sheet1!F1
Department Average Salary

Average the salaries in B1:B10 where the department in A1:A10 is "Sales". Formula: =AVERAGEIF(A1:A10,"Sales",B1:B10).

Example 2 - Average values above 1000

This version uses a comparison rule. Because the values being checked and averaged are in the same range, average_range is not needed.

=AVERAGEIF(B1:B10,">1000") // Averages only values greater than 1000.
Check Answer
Challenge #2
Target: Sheet1!F2
Average Large Sales

Average only the values in B1:B10 that are greater than 1000. Formula: =AVERAGEIF(B1:B10,">1000").

Example 3 - Average rows that contain North

The wildcard makes the match flexible, so Excel includes any entry that contains the word North.

=AVERAGEIF(A1:A10,"*North*",B1:B10) // Averages all matching North rows.
Check Answer
Challenge #3
Target: Sheet1!F3
Search with Wildcards

Average sales for entries in A1:A10 that contain the word "North". Formula: =AVERAGEIF(A1:A10,"*North*",B1:B10).

Example 4 - Use a cell as the condition

This is handy for reusable reports because the formula changes when the value in the criteria cell changes.

=AVERAGEIF(A1:A10,C1,B1:B10) // Uses the rule stored in C1.
Check Answer
Challenge #4
Target: Sheet1!F4
Dynamic Category Lookup

Average expenses for the category stored in cell C1. Formula: =AVERAGEIF(A1:A10,C1,B1:B10).

Conclusion Recap

  • Main job: AVERAGEIF returns the mean for values that match one condition.
  • Flexible criteria: You can use text, numbers, operators, wildcards, or cell references.
  • Optional average range: If you leave it out, Excel averages the matching cells in range.
  • Wildcard support: * matches many characters and ? matches one.
  • No matches: If nothing meets the condition, the result is #DIV/0!.
  • Next step: Use AVERAGEIFS when one condition is not enough.
Tactical Arena
Select Scenario:
Share AVERAGEIF Function!

Tell your friends about this post

Discussion

ExcelClash is an interactive platform designed to level up your Excel skills through real-world exercises and challenges. Sharpen your logic, solve real spreadsheet problems, and learn faster.

© 2026 ExcelClash, Inc. All rights reserved.