In Excel: use =AVERAGEIFS(average_range, criteria_range1, criteria1, …) — it averages only the rows that satisfy every condition you list.
On this page8
Syntax
Arguments
| Argument | required / optional | 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
Select the result cell and type =AVERAGEIFS(.
Select the range of numbers to average first — this is the argument order that differs from AVERAGEIF.
Add a comma, select the first condition column, another comma, then the condition in quotes.
Repeat the range-and-criterion pair for each further condition, then press Enter.
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. Check the referenced cells, argument order and result type in your workbook. Start with the worked example before changing an input, then compare the changed result with the calculation you expected. An error value or a result of a different type is a reason to inspect the inputs and arguments.
In Google Sheets
Google Sheets support for this task has not been verified. Check the function, arguments and workflow in the target product before transferring the example. Matching formula notation does not establish identical behaviour. 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 and the detail above shows why it holds — so the next time a colleague asks, you can answer without reaching for search. For “averageifs function in excel”, keep the input cells and the result visible while you check the formula in Excel. Follow the worked example and change one input at a time. The steps explain the workbook calculation; this page does not run a live calculator for that task.
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.