Averaging Across Conditions With AVERAGEIFS
Average values filtered by more than one test.
Averaging Across Conditions With AVERAGEIFS is a free Excel Formulas Academy lesson on CoddyKit — lesson 3 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Excel Formulas Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
Averaging Only What Matters
AVERAGEIFS calculates the mean of values that meet several conditions at once. Instead of averaging every sale, you can ask What was the average East region sale in January?
It completes the trio: SUMIFS totals, COUNTIFS counts, and AVERAGEIFS finds the middle value — all using the same multi-criteria style. If you know one, you almost know all three.
The AVERAGEIFS Structure
AVERAGEIFS mirrors SUMIFS exactly. The values to average come first, then the condition pairs.
average_range— the numbers to averagecriteria_range1,criteria1criteria_range2,criteria2
Behind the scenes it sums the matching values and divides by how many matched — essentially SUMIFS divided by COUNTIFS, in one clean function.
=AVERAGEIFS(average_range, criteria_range1, criteria1, criteria_range2, criteria2)A Worked Example
With column A as Region, column B as Month, and column C as Amount, here's the average East region sale in January.
The amounts in C:C are what we average. The two condition pairs filter the rows down to East and January before the mean is taken.
=AVERAGEIFS(C:C, A:A, "East", B:B, "January")Averaging With Number Thresholds
You can filter the values being averaged by their own size. Suppose you want the average of large East region sales only — those above 100.
Here column C is used both as the average_range and as a criteria_range. AVERAGEIFS is happy to reuse the same column for both roles.
=AVERAGEIFS(C:C, A:A, "East", C:C, ">100")Dynamic Criteria From Cells
To build a report users can drive, reference cells instead of typing values. Put the region in F1 and a minimum amount in F2.
For the comparison, join the operator to the cell: ">"&F2 means greater than whatever F2 holds. Plain text matches like the region need no operator, just the cell reference.
=AVERAGEIFS(C:C, A:A, F1, C:C, ">"&F2)The Division-by-Zero Trap
The biggest gotcha with AVERAGEIFS: if no rows match all your conditions, there's nothing to average, so it returns a #DIV/0! error.
This is different from SUMIFS (which returns 0) and COUNTIFS (which returns 0). An average of zero items is undefined, so Excel raises an error instead of guessing.
=AVERAGEIFS(C:C, A:A, "Mars")Guarding Against No Matches
Wrap the formula in IFERROR to show a friendly value when nothing matches. Instead of an ugly #DIV/0!, the user sees a dash or a message.
This keeps dashboards looking clean even when a filter combination has no data. Always consider the empty case when averaging filtered data.
=IFERROR(AVERAGEIFS(C:C, A:A, F1, B:B, F2), "No data")Blank Cells Are Skipped, Zeros Are Not
An important nuance: AVERAGEIFS ignores blank cells in the average_range — they don't count toward the total or the divisor. But a cell containing 0 is a real number and is included.
If zeros are placeholders for missing data, they'll drag your average down. Consider adding a criterion like C:C, "<>0" to exclude them when appropriate.
=AVERAGEIFS(C:C, A:A, "East", C:C, "<>0")Three Conditions Together
Stack as many conditions as you need. With column D as Salesperson, find the average sale that was East, in January, and made by Maria.
Each added pair tightens the filter. Because AVERAGEIFS uses AND logic, only rows passing all three conditions feed into the mean.
=AVERAGEIFS(C:C, A:A, "East", B:B, "January", D:D, "Maria")AVERAGEIF vs AVERAGEIFS
Keep the two argument orders straight:
- AVERAGEIF:
range, criteria, [average_range]— test range first, average_range optional and last. - AVERAGEIFS:
average_range, range1, crit1, ...— average_range always first.
As with the others, defaulting to the plural ...IFS version gives you one consistent pattern across SUM, COUNT, and AVERAGE.
=AVERAGEIFS(C:C, A:A, "East")Building a Comparison Report
AVERAGEIFS powers many side-by-side summaries. List region names down column F, then compute each region's average sale with a single fillable formula by locking the criteria column.
With $C:$C as the average_range, $A:$A as the criteria_range, and $F2 as the relative region cell, copying the formula down gives you one average per region instantly.
=AVERAGEIFS($C:$C, $A:$A, $F2)Quick Check
Recall what makes AVERAGEIFS behave differently from its siblings.
Recap: AVERAGEIFS
You can now average values across multiple conditions:
AVERAGEIFS(average_range, range1, crit1, ...)— average_range comes first.- No matches gives
#DIV/0!— guard it withIFERROR. - Blank cells are skipped, but zeros are included; exclude them with
"<>0"if needed. - Use
">"&F1for dynamic numeric limits.
Next: handling date ranges inside these criteria functions.
=IFERROR(AVERAGEIFS(C:C, A:A, F1, C:C, ">"&F2), "No data")Frequently asked questions
Is the “Averaging Across Conditions With AVERAGEIFS” lesson free?
Yes — the full text of “Averaging Across Conditions With AVERAGEIFS” is free to read here on the web, and the Excel Formulas Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Excel Formulas Academy course, upgrade to CoddyKit PRO.
What will I learn in “Averaging Across Conditions With AVERAGEIFS”?
Average values filtered by more than one test. You practise Excel Formulas Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start Excel Formulas Academy?
No prior experience is required. Excel Formulas Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 3 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Averaging Across Conditions With AVERAGEIFS” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this Excel Formulas Academy lesson?
Yes. Every Excel Formulas Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- Summing Across Conditions With SUMIFS
- Counting Across Conditions With COUNTIFS
- Averaging Across Conditions With AVERAGEIFS
- Date Ranges in Criteria Functions