Average with Multiple Criteria
Average values only where every selected condition matches the same row, then reconcile the result to the matching sum and count to expose the included population.
| Average with Multiple Criteria, Formula Review | |||||||
| Compare one-condition averages with the Group-and-Region AVERAGEIFS result. | |||||||
| Source data, synthetic | AVERAGEIFS review, editable criteria | ||||||
| Record | Group | Region | Sales ($) | Group criterion | A | ||
| REC-001 | A | North | 120 | Region criterion | North | ||
| REC-002 | A | South | 100 | ||||
| REC-003 | B | North | 200 | Example | Formula syntax | Result ($) | |
| REC-004 | A | North | 180 | Group only | =AVERAGEIFS($D$12:$D$23,$B$12:$B$23,$G$11) | 136.7 | |
| REC-005 | B | South | 160 | Region only | =AVERAGEIFS($D$12:$D$23,$C$12:$C$23,$G$12) | 185.0 | |
| REC-006 | B | North | 220 | Both criteria | =AVERAGEIFS($D$12:$D$23,$B$12:$B$23,$G$11,$C$12:$C$23,$G$12) | 150.0 | |
| REC-007 | A | South | 140 | ||||
| REC-008 | A | North | 150 | ||||
| REC-009 | B | South | 180 | ||||
| REC-010 | B | North | 240 | ||||
| REC-011 | A | South | 130 | ||||
| REC-012 | B | South | 200 | ||||
| Reliability checks | |||||||
| Group A / North average returns the expected 150.0 | OK | ||||||
| Average reconciles to matching sum divided by matching count | OK | ||||||
Overview
Return one average from rows where both an editable Group and Region match. The result represents the mean of the qualifying numeric Sales values, not an average of subgroup summaries. Supporting totals reveal which population produced the answer.
When to use it
Use it for average selling price by segment and region, blended rates by product and market, average collection days by class and status, or any row-level metric defined by several exact conditions. All criteria ranges must align with the values being averaged.
When not to use it
Use a PivotTable when users need an interactive matrix of many combinations. Use an array-based calculation when a criterion must transform the source values before comparison. If no-match cases need a controlled message, add an explicit population test rather than hiding every error with IFERROR.
Problem
A plain AVERAGE includes records outside the intended population, while averaging already summarized group averages can give each group equal influence despite different record counts. The calculation must filter at row level and apply every condition to the same record.
Inputs
Input | Location | Sample |
|---|---|---|
Group criterion | | A |
Region criterion | | North |
Source data
The synthetic source occupies B12:D23; each row holds one Group, Region, and numeric Sales value. Three qualifying records are sufficient to reproduce the result:
Record | Group | Region | Sales |
|---|---|---|---|
REC-001 | A | North | 120 |
REC-004 | A | North | 180 |
REC-008 | A | North | 150 |
The full average range and both criteria ranges cover the same rows. Blanks or text in Sales are ignored; numeric zero is included. Sorting and duplicate identifiers do not change the aggregate because matching is row-based.
Calculations
- Treat Sales as the numeric average range.
- Keep rows whose Group equals the first selected criterion.
- Further restrict those rows to the selected Region.
- Average the numeric values where both tests are true.
- Recalculate the same population with SUMIFS and COUNTIFS for reconciliation.
Outputs
The formula returns 150.0 for Group A and North. The supporting sum is 450 and the count is 3, so 450 ÷ 3 = 150.0. A valid numeric zero can be the result; no qualifying numeric values instead produces #DIV/0!.
Formula map
=AVERAGEIFS($D$12:$D$23,$B$12:$B$23,$H$11,$C$12:$C$23,$H$12)
D12:D23 is the average range. Each following pair supplies a criteria range and criterion. Absolute source and input references preserve the population if the formula is copied.
Model checks
The workbook tests whether AVERAGEIFS equals the visible SUMIFS result divided by the COUNTIFS result. A second check compares the aggregate count with the row-level match audit. Both return OK for the supplied data.
Edge cases
- No qualifying numeric values return
#DIV/0!. - Blank and text cells in the average range are ignored; zero remains part of the average.
- Criteria comparisons are not case-sensitive.
- Duplicate rows each contribute if they independently satisfy both conditions.
- Ranges with different boundaries invalidate the row alignment and can return an error.
Common errors
- Starting with a criteria range: AVERAGEIFS expects the numeric average range first. Correct the argument order.
- Averaging summary averages: this ignores different subgroup sizes. Apply the formula to normalized row-level data.
- Suppressing a no-match error immediately: this can make missing population look like a valid zero. Display or test COUNTIFS first.
Example
For Group A and North, the qualifying Sales values are 120, 180, and 150. Their sum is 450 and there are three numeric observations, giving 450 ÷ 3 = 150. This independent calculation agrees with the AVERAGEIFS result of 150.0.
Example workbook
Replace the cream criteria in Combined Example!H11:H12 or edit the synthetic source in B12:D23. The live average is in I17, with matching sum, count, row flags, and checks nearby. Formula Review compares one-condition and two-condition averages.
Key takeaway
Define the population at row level, keep every range aligned, and reconcile the conditional average to its matching sum divided by matching count.