How AVERAGEIF works
AVERAGEIF walks through the criteria range, checks each cell against your condition, and averages the matching values from the average_range. If you skip the third argument, it averages the criteria range itself (single-column shortcut for numeric thresholds).
Criteria can be a literal value ("North"), a comparison string (">1000", "<>0"), a cell reference (E1), or a wildcard pattern ("PO-*"). The same flexibility you have in SUMIF and COUNTIF, just averaged instead of summed or counted.
Empty cells in the average_range are skipped (they don't drag the average toward zero). Cells containing text or errors are also skipped. Zero values ARE included, so a row with $0 in revenue pulls the average down, which is usually what you want for a true mean.
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
| range | range | ✓ Required | The cells to check against the criterion. Usually the column holding your category, region, status, etc. |
| criteria | any | ✓ Required | What counts as a match. Text in quotes ("North"), a comparison string (">1000", "<>Cancelled"), a cell reference (E1), or a wildcard pattern ("PO-*", "*finance*"). |
| average_range | range | ✗ Optional | The cells whose values to actually average. Same height as range. Omit to average the range itself (useful for numeric thresholds like ">1000" against a single column). |
AVERAGEIF basic: average sales of North reps
Sales reps in column A with their region in B and Q4 sales in C. Question for the VP: what was the average Q4 sales per North rep? AVERAGEIF reads the region column, picks the rows where region equals North, and averages the matching Q4 numbers.
=AVERAGEIF(B2:B11, "North", C2:C11)- •
B2:B11-> the region column (criteria range) - •
"North"-> the literal text to match, in quotes - •
C2:C11-> the column to actually average (Q4 sales) - •
Three Norths-> rows 2, 5, and 8 match. AVERAGEIF averages just those three numbers. - •
Result-> $4,800 - the mean of $4,200, $5,800, and $4,400
| A | B | C | D | E | F | G | H | |
|---|---|---|---|---|---|---|---|---|
| 1 | Sales rep | Region | Q4 sales | Avg North | ||||
| 2 | Sarah Chen | North | $4,200 | $4,800 | ← formula | |||
| 3 | James Miller | South | $3,800 | |||||
| 4 | Maria Santos | East | $5,100 | |||||
| 5 | David Brown | West | $4,500 | |||||
| 6 | Emma Davis | North | $5,800 | |||||
| 7 | Alex Kim | South | $3,200 | |||||
| 8 | Carlos Gomez | East | $6,200 | |||||
| 9 | Jenny Liu | North | $4,400 | |||||
| 10 | Mark Reilly | West | $3,900 | |||||
| 11 | Rachel Wood | South | $4,100 |
AVERAGEIF with comparison: average orders above $1,000
Two-argument AVERAGEIF: pass only the range and a comparison string, and Excel averages the cells in that range that match. Useful when you want the mean of values above or below a threshold without a separate criteria column.
=AVERAGEIF(B2:B11, ">1000")- •
B2:B11-> the order-amount column (acts as both range and average_range) - •
">1000"-> comparison criterion - strictly greater than 1000 - •
No third arg-> Excel uses the range itself as the average_range - •
Five rows above $1,000-> PO-1002, PO-1004, PO-1005, PO-1007, PO-1009 - •
Result-> $2,764 - the mean of $2,400 + $3,150 + $1,250 + $5,020 + $2,000 = $13,820 / 5
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | Order | Amount | Avg over $1k | ||||
| 2 | PO-1001 | $450 | $2,764 | ← formula | |||
| 3 | PO-1002 | $2,400 | |||||
| 4 | PO-1003 | $890 | |||||
| 5 | PO-1004 | $3,150 | |||||
| 6 | PO-1005 | $1,250 | |||||
| 7 | PO-1006 | $700 | |||||
| 8 | PO-1007 | $5,020 | |||||
| 9 | PO-1008 | $320 | |||||
| 10 | PO-1009 | $2,000 | |||||
| 11 | PO-1010 | $580 |
AVERAGEIF with wildcards: average POs by prefix
Wildcards work the same way as in SUMIF and COUNTIF. Use `*` to match any string of characters and `?` to match a single character. Useful when product codes have a category prefix and you want the average for one category.
=AVERAGEIF(A2:A11, "PO-*", B2:B11)- •
A2:A11-> the order-code column - •
"PO-*"-> matches any code starting with PO- - •
B2:B11-> the amount column to average - •
Six PO- codes-> the rest are ON- (online) or SR- (subscription) - •
Result-> $2,115 - sum of $450 + $2,400 + $3,150 + $1,250 + $5,020 + $420 = $12,690 divided by 6
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | Code | Amount | Avg PO orders | ||||
| 2 | PO-1001 | $450 | $2,115 | ← formula | |||
| 3 | PO-1002 | $2,400 | |||||
| 4 | ON-2001 | $130 | |||||
| 5 | PO-1004 | $3,150 | |||||
| 6 | SR-3001 | $50 | |||||
| 7 | PO-1005 | $1,250 | |||||
| 8 | ON-2002 | $210 | |||||
| 9 | PO-1007 | $5,020 | |||||
| 10 | SR-3002 | $75 | |||||
| 11 | PO-1009 | $420 |
AVERAGEIFS: multiple criteria at once
When one criterion is not enough, AVERAGEIFS lets you stack them. The argument order is different from AVERAGEIF: average_range comes FIRST, then the criteria pairs.
Below: average salary of employees who are both in Engineering AND have status Active. A row has to clear BOTH filters to be included.
=AVERAGEIFS(C2:C11, A2:A11, "Engineering", B2:B11, "Active")- •
C2:C11-> the column to average (Salary) - comes FIRST in AVERAGEIFS - •
A2:A11, "Engineering"-> first criteria pair: department equals Engineering - •
B2:B11, "Active"-> second criteria pair: status equals Active - •
Three matches-> Sarah, James, and Alex are all Engineering + Active - •
Result-> $91,333 - the mean of $95,000, $88,000, $91,000
| A | B | C | D | E | F | G | H | I | |
|---|---|---|---|---|---|---|---|---|---|
| 1 | Department | Status | Salary | Avg active eng | |||||
| 2 | Engineering | Active | $95,000 | $91,333 | ← formula | ||||
| 3 | Engineering | Active | $88,000 | ||||||
| 4 | Marketing | Active | $72,000 | ||||||
| 5 | Engineering | On Leave | $102,000 | ||||||
| 6 | Sales | Active | $68,000 | ||||||
| 7 | Engineering | Active | $91,000 | ||||||
| 8 | Operations | Active | $75,000 | ||||||
| 9 | Marketing | Active | $78,000 | ||||||
| 10 | Engineering | Terminated | $85,000 | ||||||
| 11 | Engineering | Active |
AVERAGEIFS by date range: monthly KPI snapshot
Stack two date criteria to constrain a window. Use >= for the start date and <= for the end date. Same shape as before, just both criteria range to the same column.
=AVERAGEIFS(B2:B11, A2:A11, ">=2026-03-01", A2:A11, "<=2026-03-31")- •
B2:B11-> the order-amount column (average_range) - •
A2:A11, ">=2026-03-01"-> first criteria: dates on or after March 1 - •
A2:A11, "<=2026-03-31"-> second criteria: dates on or before March 31 - •
Three March rows-> the 8th, 14th, and 27th - •
Result-> $1,217 - mean of $980, $1,420, $1,250
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | Order date | Amount | Avg in March | ||||
| 2 | 2026-02-12 | $640 | $1,217 | ← formula | |||
| 3 | 2026-02-27 | $1,830 | |||||
| 4 | 2026-03-08 | $980 | |||||
| 5 | 2026-03-14 | $1,420 | |||||
| 6 | 2026-03-27 | $1,250 | |||||
| 7 | 2026-04-02 | $2,100 | |||||
| 8 | 2026-04-15 | $540 | |||||
| 9 | 2026-04-29 | $3,420 | |||||
| 10 | 2026-05-04 | $1,870 | |||||
| 11 | 2026-05-11 | $2,950 |
Where people go wrong
- Argument order flip between AVERAGEIF and AVERAGEIFS
AVERAGEIF takes range, criteria, [avg_range]. AVERAGEIFS takes avg_range FIRST, then pairs of range/criteria. Copying an AVERAGEIF and adding an extra pair gives a #VALUE! error because the first range is in the wrong slot.
Fix: Rewrite from scratch when you switch to AVERAGEIFS. Put the column you want to average first, then add criteria pairs. Same rule applies to SUMIFS, MAXIFS, MINIFS. - Comparison operator outside the quotes
Writing AVERAGEIF(B2:B11, > 1000) returns #NAME? because Excel can't parse the comparison without the operator and the value being a single string.
Fix: Always wrap the comparison: ">1000", "<=500", "<>0". If the threshold lives in a cell, concatenate: ">" & E1. - Empty match returns #DIV/0!
If zero rows match the criteria, AVERAGEIF divides by zero and returns #DIV/0!. The report breaks visibly in front of a stakeholder.
Fix: Wrap with IFERROR for production reports: =IFERROR(AVERAGEIF(...), 0) or =IFERROR(AVERAGEIF(...), "No data"). For lookups specifically, prefer IFNA so genuine bugs still surface. - Treating zeros as missing data
AVERAGEIF includes zero values in its calculation. A column with $0 entries for products that didn't sell that week pulls the average down. Sometimes that's correct (true mean), sometimes it's not (you wanted sales-day average).
Fix: Decide what zero means in your data. If zero means "no sale that week" and you want the per-active-week mean, add a second criterion: AVERAGEIFS(..., range, "<>0"). Excludes the zeros from the divisor.
Notes
- Available in every Excel version since 2007. AVERAGEIFS arrived in 2007 too.
- Text criteria are case-insensitive. "North" and "north" match the same rows.
- Wildcards: * matches any string, ? matches one character. Use ~* or ~? to match a literal asterisk or question mark.
- Empty cells in the average_range are skipped. They don't pull the mean toward zero.
- Zero values ARE included. If you want to exclude zeros, add a "<>0" criterion via AVERAGEIFS.
- Empty matches return #DIV/0!. Wrap with IFERROR for production reports.
- AVERAGEIFS argument order: average_range FIRST, then range/criteria pairs. Different from AVERAGEIF.
- For weighted averages (different weights per row), AVERAGEIF won't do it. Use SUMPRODUCT instead.
Now prove it
Reading about AVERAGEIF is one thing.
Writing one in a board-meeting deck at 8am, where the CFO is staring at the screen and the average needs to be the average of just the rows that match three different filters, is completely different.
These exercises drop AVERAGEIF into real workplace patterns: regional averages, weighted KPIs, conditional means, date-bounded snapshots.
Here's the thing about AVERAGEIF.
You can read this page twice and still hesitate when a manager asks for the average revenue of active accounts in the East region for orders over $1,000 placed in the last 30 days.
That gap, between knowing what AVERAGEIF does and being able to write one fluently while someone is waiting, is exactly what CellSkill is built to close.
Not with more reading.
With practice on scenarios that look like your actual job.
Start practicing AVERAGEIF for free →