WorkbookLogic
FunctionStatisticalintermediateAVERAGEIFIFROUND

AVERAGEIF Function

By WorkbookLogic

The Excel AVERAGEIF function averages numeric values that meet one condition. It can test the values being averaged or use a separate, aligned criteria range.

ExcelLast reviewed Sep 11, 2026
averageif-function-v1.0.0.xlsx
Excel AVERAGEIF Function
Average numeric values when one criterion is met while blanks and nonmatching records remain excluded.
Source data, editableAVERAGEIF examples
TeamStatusScoreExampleCriterionFormula syntaxResult
AlphaComplete88.0Selected team averageAlpha=AVERAGEIF(A12:A21,F12,C12:C21)85.0
BetaComplete74.0Selected status averageComplete=AVERAGEIF(B12:B21,F13,C12:C21)70.5
AlphaOpen92.0Scores at least 80>=80=AVERAGEIF(C12:C21,F14,C12:C21)88.3
GammaComplete0.0
BetaOpen81.0How to read the examples
AlphaComplete76.0The criteria range decides which rows qualify.
BetaComplete95.0The editable criterion can be text, a number, or an operator expression.
GammaOpen-10.0The result updates when source values or the criterion changes.
AlphaOpen84.0
GammaComplete90.0
Reliability checks
Alpha average equals its four visible scoresOK
Zero is included when its row satisfies the criterionOK

Overview

The Excel AVERAGEIF function calculates an average for values selected by one rule. It handles the matching sum and numeric count together, reducing the risk that separate numerator and denominator formulas describe different records.

Quick reference

Syntax: =AVERAGEIF(range, criteria, [average_range])

Returns: The arithmetic mean of qualifying numeric cells. (number)

Arguments:

  • range (required) — The cells tested against the criterion.
  • criteria (required) — The text, number, expression, cell reference, or wildcard pattern that determines which positions qualify.
  • average_range (optional) — The numeric cells to average at qualifying positions; when omitted, numeric cells in range are averaged.

The bracketed average_range argument is optional. When it is omitted, Excel averages qualifying numeric cells in range; when supplied, it must align positionally with the tested range.

Common uses

  • Average scores for one team, class, product, or region.
  • Calculate the mean for completed or approved records.
  • Average values above or below a threshold.
  • Measure performance before or after a date cutoff.

Calculations

AVERAGEIF evaluates each cell in range. When the criterion is true, Excel uses the value at the same relative position in average_range. If average_range is omitted, the tested range also supplies the values to average.

Only qualifying numeric cells form the final arithmetic mean. A qualifying zero is numeric, so it remains in the denominator and can lower the result. Empty cells and text in the average range are not included in the average. If no qualifying numeric value remains, the function returns #DIV/0!.

The criteria syntax matches other conditional functions. Operators are enclosed in quotes, reference-based thresholds are concatenated as ">="&F14, matching is not case-sensitive, and wildcards can be used with text.

Function behavior

Situation

Behavior

Omitted average_range

Qualifying numeric cells in range are averaged.

Numeric zero

Included in both the sum and count when it qualifies.

Empty cells

Excluded from the average, even when the corresponding criterion position qualifies.

Text and logical values

Ignored in the values being averaged.

No qualifying numeric cells

Returns #DIV/0!.

Text case and wildcards

Matching is not case-sensitive; * and ? support text patterns.

Range alignment

average_range is mapped by relative position from its upper-left cell, so mismatched ranges can average unintended cells.

Calculated arrays

range and average_range must be worksheet ranges rather than arrays returned by another function.

Common errors

Treating zero as a blank

What happens:
A qualifying zero remains in the denominator and lowers the result, which may look unexpected.

Better approach:
Decide whether zero is a valid observation. If it represents missing data, clean or exclude it with an intentional criterion.

Omitting average_range when another column holds the values

What happens:
Excel attempts to average qualifying numeric cells in the criteria range itself.

Better approach:
Supply the aligned numeric range explicitly when the tested field and averaged field differ.

Using mismatched range boundaries

What happens:
Excel maps from the upper-left cell and can average values from unintended rows.

Better approach:
Use equal-sized ranges that start and end on the same records.

Expecting a zero when nothing qualifies

What happens:
With no qualifying numeric observations, there is no valid denominator and Excel returns #DIV/0!.

Better approach:
Check the qualifying count or wrap the formula only when a blank or alternative output is appropriate for the model.

Applying multiple conditions

What happens:
AVERAGEIF accepts only one criterion.

Better approach:
Use AVERAGEIFS for two or more AND-based conditions.

Example

Example 1 — Average by Team

=AVERAGEIF(A12:A21,F12,C12:C21)

With Alpha in F12, the workbook averages 88, 92, 76, and 84, returning 85.0.

Example 2 — Average by Status

=AVERAGEIF(B12:B21,F13,C12:C21)

This averages Score for rows with the selected status. The Complete group includes a numeric zero and returns 70.5.

Example 3 — Average Values Above a Threshold

=AVERAGEIF(C12:C21,F14,C12:C21)

The Score range supplies both the values tested and the values averaged. With >=80 in F14, the result is 88.3.

Example workbook

The workbook contains an AVERAGEIF Example sheet with ten editable Team, Status, and Score records. Three live formulas demonstrate team, status, and threshold criteria, and two checks reconcile the Alpha average and the treatment of a matching zero. A Notes sheet explains criteria, denominator behavior, and alignment.

Key takeaway

Use AVERAGEIF for one-condition averages, keep the criteria and average ranges aligned, and remember that qualifying zeros count while blanks do not.