The Excel AVERAGEIF function averages only the cells that meet a single condition — for example, the mean sale in just the East region, or the average score above a cutoff.
Syntax
| Argument | Description | |
|---|---|---|
range | Required | The cells to test against the criteria. |
criteria | Required | The condition, e.g. "East", ">100", "<>0", or a cell reference. |
average_range | Optional | The cells to average. If omitted, range itself is averaged. |
How to use it
AVERAGEIF tests every cell in range against one criteria and averages the matching rows. If you supply a separate average_range, the test happens in the first range but the numbers are pulled from the second.
Criteria support comparison operators (>, <, >=, <>) and wildcards (* for any text, ? for a single character). For a region column where the East rows total 1,240 across 4 entries, =AVERAGEIF(A2:A20,"East",B2:B20) returns 310.
Need more than one condition? Use AVERAGEIFS, which lets you stack multiple criteria pairs (region and month and > target).
Try it: interactive demo
Pick a AVERAGEIF example to see the formula and its result.
Practice workbook
Frequently asked questions
What if I omit the average_range argument?
range argument itself. Supply average_range only when the values to average live in a different column.Can I use comparison operators or wildcards?
">100", "<>0", or text with wildcards like "North*". Wrap operators in quotes and join cell references with &, e.g. ">"&C1.Why do I get a #DIV/0! error?
How is AVERAGEIF different from AVERAGEIFS?
Master functions like this in one day
This page covers one function. Our Excel Formulas and Functions class covers the 30 that matter most — live, hands-on, taught by professionals in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.
See the Formulas & Functions Class