Perform logical operations by using the AVERAGEIFS() function
=AVERAGEIFS($C$2:$C$7, $A$2:$A$7, E2, $B$2:$B$7, F2)Average the orders on the rows where the city matches E2 and the shift matches F2. The range to average comes first, as in SUMIFS.
What the MO-211 task asks
An AVERAGEIFS task asks for an average of a subset defined by two or more conditions: “return the average Result across the rows where the Client is Meridian Foods AND the Matrix is Syrup. Both conditions must hold.”
The range to average goes first, then the ranges and conditions in pairs. When no row meets every condition, the result is #DIV/0!: there is nothing to average.
Our grader checks the value in every cell of the target range. It reads the values, not the function, so any formula that produces them earns the points — but one wrong cell fails the whole range.
Worked examples
Type these into a blank sheet to follow along. Every result below is what Excel showed.
| A | B | C | |
|---|---|---|---|
| 1 | City | Shift | Orders |
| 2 | Dallas | Day | 40 |
| 3 | Dallas | Night | 22 |
| 4 | Austin | Day | 35 |
| 5 | Dallas | Day | 50 |
| 6 | Austin | Night | 18 |
| 7 | Austin | Day | 41 |
| E | F | G | |
|---|---|---|---|
| 1 | City | Shift | Avg orders |
| 2 | Austin | Day | 38 |
| 3 | Dallas | Day | 45 |
| 4 | Houston | Day | #DIV/0! |
=AVERAGEIFS(C2:C7, A2:A7, "Dallas", B2:B7, "Day")The two Dallas day shifts took 40 and 50 orders.
=AVERAGEIFS(C2:C7, B2:B7, "Day", C2:C7, ">40")Day shifts with more than 40 orders: 50 and 41. Exactly 40 does not count, because the test is >.
=AVERAGEIFS(C2:C7, A2:A7, "Houston")No row is in Houston, so there is nothing to average.
=AVERAGEIFS($C$2:$C$7, $A$2:$A$7, E2, $B$2:$B$7, F2)Each row reads its city and shift from columns E and F, across the same locked ranges. This is what the video below builds.
Watch it done in Excel
The last example above, recorded in real Excel on the same grid.
Exam traps
AVERAGEIF puts it last; AVERAGEIFS puts it first. =AVERAGEIFS(A2:A7, "Dallas", C2:C7) leaves the arguments unpaired, and Excel will not accept the formula.
Unlocked, the formula in G2 filled to G3 tests rows 3 to 8. Dallas Day loses row 2 and averages 50 instead of 45.
=AVERAGEIFS(C2:C7, A2:A6, "Dallas") returns #VALUE!. Every range in the formula must be the same size.
It means no row met every condition. Check each condition against the data — a city or shift spelled differently from the sheet is the usual cause.
FAQ
Can the conditions come from cells?
Yes, as in the filled-down example. =AVERAGEIFS(C2:C7, A2:A7, E3, B2:B7, F3) returns 45, reading Dallas and Day from E3 and F3.
How do I show 0 instead of #DIV/0!?
Only if the task asks for it. Test the count first: =IF(COUNTIFS(A2:A7, "Houston")=0, 0, AVERAGEIFS(C2:C7, A2:A7, "Houston")) returns 0.
Is the condition case-sensitive?
No. =AVERAGEIFS(C2:C7, A2:A7, "dallas", B2:B7, "day") returns 45.
New to this function?
This page covers what the exam asks. For the full how-to — every argument, more examples and a practice workbook — read our guide on dfwexcel.com.
The AVERAGEIFS function, explained — dfwexcel.comTry it under exam conditions
Take a full, timed MO-211 practice exam, upload the workbook you built, and get a score out of 1000 with a per-task breakdown of where the points went. Your first one is free.
No credit card needed.
