ExcelReady
CourseMock testsFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before day one. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Mock tests
  • Function guides
  • Blog

Test prep

  • Excel level test
  • Excel test practice
  • Free screening quiz
  • Certificate

Company

  • About
  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Conditional math
  3. AVERAGEIFS in Excel: Averages With Several Conditions

AVERAGEIFS in Excel: Averages With Several Conditions

By ExcelReady Team·Updated November 1, 2026·6 min read

The short answer

AVERAGEIFS averages the numbers in one range for the rows that meet every condition you give it. Write =AVERAGEIFS(average_range, criteria_range1, criteria1, ...), for example =AVERAGEIFS(C2:C8,A2:A8,"North",B2:B8,"Swift") for the average delivery days of Swift orders in the North. If no row matches, it returns #DIV/0!.

Key takeaways

  • The average range comes first, then pairs of a criteria range and a criteria.
  • A row is included only when it meets every condition (AND logic).
  • AVERAGEIFS returns #DIV/0! when no row matches; wrap it in IFERROR to show a message.
  • Blank cells and text in the average range are ignored, but zeros are included.
  • AVERAGEIF puts the average range last; AVERAGEIFS puts it first.
On this page+
  1. What does AVERAGEIFS do?
  2. How to use AVERAGEIFS step by step
  3. AVERAGEIFS examples with text, numbers and dates
  4. AVERAGEIF vs AVERAGEIFS
  5. How to fix #DIV/0! in AVERAGEIFS
  6. How blanks, text and zeros are treated
  7. Related functions: MAXIFS, MINIFS and more
  8. How to build an average table by region and courier
  9. Practise it

AVERAGEIFS in Excel works out an average using only the rows that meet several conditions at once, such as "orders in the North and sent by Swift". It is the averaging partner of SUMIFS and COUNTIFS, with the same argument pattern. This guide covers the syntax, examples with text, numbers and dates, and the #DIV/0! error you'll see when nothing matches.

What does AVERAGEIFS do?#

AVERAGEIFS finds the average (the arithmetic mean) of the numbers in one range, counting only the rows where every condition is TRUE. Its syntax is:

Excel formula
=AVERAGEIFS(average_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)
PartWhat it meansExample
average_rangeThe numbers to averageC2:C8
criteria_range1The first column to checkA2:A8
criteria1What that column must match"North"
criteria_range2, criteria2More pairs (optional)B2:B8,"Swift"

AVERAGEIFS works in Excel 2007 and every later version, including Microsoft 365 and Excel for the web. You can add up to 127 range and criteria pairs. The AVERAGEIFS function guide summarises the arguments.

Every example uses this delivery log in A1:C8:

ABC
1RegionCourierDays
2NorthSwift2
3SouthSwift4
4NorthParcel5
5NorthSwift3
6SouthParcel6
7EastSwift3
8NorthParcel7

How to use AVERAGEIFS step by step#

To find the average delivery time for Swift orders in the North:

  1. Click an empty cell, such as F2.
  2. Type =AVERAGEIFS(C2:C8, to set the numbers to average.
  3. Type A2:A8,"North", for the first condition.
  4. Type B2:B8,"Swift") for the second condition.
  5. Press Enter.
Excel formula
=AVERAGEIFS(C2:C8,A2:A8,"North",B2:B8,"Swift")

The result is 2.5. Only rows 2 and 5 are North and Swift, with 2 and 3 days, and (2 + 3) / 2 = 2.5. All the ranges must be the same size, or AVERAGEIFS returns #VALUE!.

AVERAGEIFS examples with text, numbers and dates#

The criteria follow the same rules as COUNTIFS and SUMIFS. Text and operators go in double quotes; numbers and cell references don't. Here are more questions on the delivery log:

QuestionFormulaResult
Average days, North only=AVERAGEIFS(C2:C8,A2:A8,"North")4.25
Average days, Swift only=AVERAGEIFS(C2:C8,B2:B8,"Swift")3
North orders taking 3+ days=AVERAGEIFS(C2:C8,A2:A8,"North",C2:C8,">=3")5
Not North, Parcel=AVERAGEIFS(C2:C8,A2:A8,"<>North",B2:B8,"Parcel")6
Days from 3 to 6=AVERAGEIFS(C2:C8,C2:C8,">=3",C2:C8,"<=6")4.2

Notice that a criteria range can be the same as the average range, as in the last two number examples. "Days from 3 to 6" averages 4, 5, 3, 6 and 3, which is 21 / 5 = 4.2.

For dates, join the operator to DATE with &. If column D held order dates, =AVERAGEIFS(C2:C8,D2:D8,">="&DATE(2024,7,1)) would average the days for orders from 1 July 2024 onwards. To use a value from a cell, join it the same way: ">="&H1, never ">=H1".

AVERAGEIF vs AVERAGEIFS#

AVERAGEIF handles one condition; AVERAGEIFS handles one or more. The big trap is the argument order:

Excel formula
=AVERAGEIF(A2:A8,"North",C2:C8)
=AVERAGEIFS(C2:C8,A2:A8,"North")

Both return 4.25. AVERAGEIF puts the average range last, and AVERAGEIFS puts it first. Many people use AVERAGEIFS for everything so they only remember one order. The guide to AVERAGEIF covers the single-condition version, and the comparison of AVERAGEIF vs AVERAGEIFS goes deeper.

How to fix #DIV/0! in AVERAGEIFS#

AVERAGEIFS returns #DIV/0! when no row meets every condition, because an average of nothing means dividing by zero. For example, =AVERAGEIFS(C2:C8,A2:A8,"West") has no West rows to average.

If an empty result is expected, wrap the formula in IFERROR to show a message instead:

Excel formula
=IFERROR(AVERAGEIFS(C2:C8,A2:A8,"West"),"No data")

If you expected matches, don't hide the error. Check the spelling of the criteria, look for extra spaces in the data, and make sure the numbers in the average range are real numbers, not text.

How blanks, text and zeros are treated#

AVERAGEIFS ignores blank cells and text in the average range, so a missing value doesn't drag the average down. Zeros are different: a 0 is a real number, so it is included. If a 0 means "no data" in your sheet, add a condition that leaves zeros out:

Excel formula
=AVERAGEIFS(C2:C8,A2:A8,"North",C2:C8,"<>0")

The guide to averaging without zeros covers this case in more detail.

One more check: if the whole average range is blank or text, there are no numbers to average, so you get #DIV/0! even when the conditions match.

Related functions: MAXIFS, MINIFS and more#

AVERAGEIFS belongs to a family of functions with the same pattern:

  • SUMIFS and COUNTIFS add and count with several conditions.
  • MAXIFS and MINIFS find the largest and smallest value with several conditions. They need Excel 2019 or later. See MAXIFS and MINIFS.

Once you know one, you know them all; only the function name and the first range change. These are core tools for reporting roles, as the guide to Excel skills for operations managers explains.

How to build an average table by region and courier#

AVERAGEIFS is ideal for a small grid with one condition down the side and another across the top. Put the regions North, South and East in E2:E4, and the couriers Swift and Parcel in F1:G1. In F2, type:

Excel formula
=IFERROR(AVERAGEIFS($C$2:$C$8,$A$2:$A$8,$E2,$B$2:$B$8,F$1),"-")

Fill it right to G2, then down to row 4. The result:

SwiftParcel
North2.56
South46
East3-

The $ signs do the work. $E2 keeps the column fixed so every cell reads the region from column E, and F$1 keeps the row fixed so every cell reads the courier from row 1. East has no Parcel orders, so IFERROR shows a dash instead of #DIV/0!.

Practise it#

AVERAGEIFS is quick to learn once the argument order sticks. Practise AVERAGEIF, MAXIFS and related functions in a live spreadsheet: you type each formula and the lesson checks it instantly. Or work out the North and Swift average in the exercise on this page first.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

What is the average delivery time for Swift orders in the North region? In F2, use AVERAGEIFS on the Days column (C2:C8).

fx
ABCDEFG
1
Region
Courier
Days
2
North
Swift
2
North + Swift
3
South
Swift
4
4
North
Parcel
5
5
North
Swift
3
6
South
Parcel
6
7
East
Swift
3
8
North
Parcel
7
9
10
11

Tip: Start with the Days range, then A2:A8 with "North", then B2:B8 with "Swift".

Practise this in a lesson

LessonAVERAGEIF, MAXIFS and MINIFSFind the average, highest and lowest values that meet one or more conditions.Function guideAVERAGEIFSAverage only the rows that meet several conditions with AVERAGEIFS. Text, number and blank criteria, common errors, and live practice.

Frequently asked questions

What is the AVERAGEIFS formula in Excel?

+

The formula is =AVERAGEIFS(average_range, criteria_range1, criteria1, criteria_range2, criteria2, ...). It averages the cells in the first range for the rows that meet all the conditions.

What is the difference between AVERAGEIF and AVERAGEIFS?

+

AVERAGEIF takes one condition and puts the average range last. AVERAGEIFS takes one or more conditions and puts the average range first. AVERAGEIFS can do everything AVERAGEIF does.

Why does AVERAGEIFS return #DIV/0!?

+

No row meets all the conditions, so there is nothing to average. Check the spelling of the criteria, or wrap the formula in IFERROR to show a message such as No data.

How do I average between two numbers with AVERAGEIFS?

+

Use the same range twice: =AVERAGEIFS(C2:C8,C2:C8,">=3",C2:C8,"<=6"). It averages the values from 3 to 6, including both limits.

Can AVERAGEIFS ignore zeros?

+

Yes. Add a condition on the average range itself: =AVERAGEIFS(C2:C8,A2:A8,"North",C2:C8,"<>0"). The "<>0" condition leaves out every zero.

Sources

  • AVERAGEIFS function - Microsoft Support
  • AVERAGEIF function - Microsoft Support
  • IFERROR function - Microsoft Support

Written and checked by the ExcelReady Team. First published November 1, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. What does AVERAGEIFS do?
  2. How to use AVERAGEIFS step by step
  3. AVERAGEIFS examples with text, numbers and dates
  4. AVERAGEIF vs AVERAGEIFS
  5. How to fix #DIV/0! in AVERAGEIFS
  6. How blanks, text and zeros are treated
  7. Related functions: MAXIFS, MINIFS and more
  8. How to build an average table by region and courier
  9. Practise it

Keep reading

Comparisons· 8 min read

AVERAGEIF vs AVERAGEIFS: Argument Order Matters

AVERAGEIF averages the numbers that meet one condition. AVERAGEIFS averages the numbers that meet one or more conditions, all of which must be true. The argument order also differs: AVERAGEIF puts the range to average last, while AVERAGEIFS puts it first. Both return #DIV/0! when nothing matches, so wrap them in IFERROR for reports.

Math· 6 min read

How to Average Without Zeros or Blanks in Excel

To average without zeros in Excel, use =AVERAGEIF(C2:C9,"<>0"). The criteria "<>0" means not equal to zero, so zero cells are left out of both the total and the count. Blank cells are already ignored by AVERAGE and AVERAGEIF. To add another condition, such as a region, use AVERAGEIFS.

Tests & careers· 5 min read

Excel for Operations Managers: The Core Skills

An operations manager uses Excel to track how work flows: NETWORKDAYS for lead times in working days, WORKDAY for promised dates, AVERAGEIFS, MAXIFS and MINIFS to compare sites or teams, pivot tables for weekly reports, and simple ratios such as on-time rate and capacity use. Clean data and clear check cells keep those reports trusted.

More on conditional math

  • How to Count Cells With Text in Excel
  • How to Count Duplicates in Excel
  • How to Count Unique Values in Excel
  • How to Count Yes, No and Ticks in Excel
  • How to Use COUNTIF in Excel (With Criteria Examples)
  • COUNTIF Between Two Numbers in Excel
All conditional math articles →

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback, right in your browser. Nothing to download.

Start learning for free