In Excel: use =AVERAGEIFS(average_range, criteria_range1, criteria1, …) — it averages only the rows that satisfy every condition you list.
Syntax
Arguments
| Argument | Description | |
|---|---|---|
average_range | required | The cells to average. |
criteria_range1 | required | The range to test. Must be the same size as average_range. |
criteria1 | required | The condition, such as "West", ">1000" or a cell reference. |
Related functions
n = 7 · Sum = 103.00 · Min = 9.00 · Max = 21.00
7 values
Need it as an auditable file?
Ships inside the linked template — formula-driven, unlocked, audit-ready.
What this does
AVERAGEIFS averages the values in one range, keeping only the rows where every criteria range meets its criterion. Note the argument order: unlike AVERAGEIF, the range to average comes first. Conditions are combined with AND, never OR, so listing two values for the same column returns nothing rather than either. Every criteria range must be exactly the same size as the average range or Excel returns #VALUE!. If no row matches at all the result is #DIV/0!, because an average of nothing is undefined — which is a genuinely useful signal rather than a bug. Keep the inputs visible and clearly labelled and the whole thing stays auditable — anyone who opens the file later, including you, can see at a glance exactly what feeds the result and change one assumption without hunting through the formula. For “averageifs function in excel”, the reliable version is a short checking loop, not just the first command that appears to work. Run it on a deliberately small range first, watch how the affected formula change, and only then apply the same setup to the full sheet. When a formula is involved, keep the inputs labelled beside it, reference cells instead of typing values, and apply number formatting only after the result checks out. That is what makes a calculation you can defend to a CFO or an auditor useful in real work: repeatable, auditable, and not dependent on memory or luck.
A worked example
Order values in D2:D500, regions in A2:A500 and channels in B2:B500. =AVERAGEIFS(D2:D500, A2:A500, "West", B2:B500, "Online") returns the mean order value for online orders in the West only. To average deals above a threshold, =AVERAGEIFS(D2:D500, D2:D500, ">1000") uses the same column for both roles. AVERAGEIFS is how a summary answers "what is the typical value for this slice" without building a filtered helper table first. If there is any chance you will reuse this, drop it into a small template tab right now: a labelled input area on the left and the formula beside it, checked once against the tool above. Next time the same question comes up, the answer is a single paste away instead of a rebuild from memory.
In Google Sheets
Google Sheets handles this almost identically to Excel. The formula syntax above is the same, and the menu lives under a slightly different label rather than a ribbon tab. Use the platform toggle at the top of the page to switch every keyboard shortcut between Windows and Mac, and expect at most cosmetic differences in naming. The aim was to get you unstuck fast and leave you a little more capable than a copy-paste would. The answer is at the top, the tool proves it, and the detail above shows why it holds — so the next time a colleague asks, you can answer without reaching for search. Here is the takeaway for “averageifs function in excel”: copy the answer if you are busy, but if you have a spare few minutes, rebuild the example in Excel yourself with the tool above open beside it. That single pass — type it, run it, watch the result move when you change an input — is what turns a formula you found into a technique you trust. Keep your inputs labelled and referenced, never hard-coded, and the same sheet stays correct and auditable as it grows. Done that way, you will not need to look this up again, and you will be the person others ask.
Common mistakes
- Using
AVERAGEIF's argument order, where the range to average comes last —AVERAGEIFSputs it first. - Expecting
ORlogic; every condition must hold at once, so two values for one column match nothing. - Criteria ranges of a different size to the average range, which returns
#VALUE!.
Frequently asked questions
Why does AVERAGEIFS return #DIV/0!?
No rows matched every condition, so there is nothing to average. Wrap it in IFERROR to show a dash instead, but check first that the criteria are really what you meant.
Can AVERAGEIFS use OR logic?
Not directly — conditions are combined with AND. For an either/or average, take the sum of two SUMIFS over the sum of two COUNTIFS.
How do I average values above a number?
Point both the average range and the criteria range at the same column: =AVERAGEIFS(D2:D500, D2:D500, ">1000").
Other ways people ask this
This is also commonly searched as “how to use averageif function in excel”, “how to use the averageif function in excel” and “how to use averageifs function in excel”. They describe the identical operation, so you are in the right place no matter how you phrased it.
Why do people search for this in so many different ways?
Because the same task has many names. “how to use averageif function in excel”, “how to use the averageif function in excel”, “how to use averageifs function in excel” all point at the one operation explained on this page, which is why they all lead here.