Totals and counts function

AVERAGEIFS

Average the rows where every condition holds.

Purpose

Average the rows where every condition holds

Returns

The average of the rows matching all the conditions

Syntax

=AVERAGEIFS(average_range, range1, condition1, [range2], [condition2], ...)

ArgumentRequiredWhat goes here
average_rangeRequiredThe column of amounts to average.
range1RequiredThe first column to test.
condition1RequiredWhat that column has to match.
range2OptionalThe next column to test.
condition2OptionalWhat that column has to match.

How to use AVERAGEIFS

AVERAGEIFS puts the column being averaged first and then takes range and condition in pairs, the same shape as SUMIFS.

As with AVERAGEIF, only matching rows are in the average at all.

Narrowing an average twice gets to a very small number of rows very quickly, and an average of two things is not really an average. Count alongside it so the reader knows.

Examples

Every result below is worked out by the same evaluator that marks your answers, on the sheet shown here.

Payables ageing — October.xlsxSheet1
Harbour Foods payables at 31 October 2026, with supplier terms alongside
ABCDEFGH
1InvoiceSupplierStatusDays overdueAmountSupplierTerms (days)
2INV-8801Brightwell PaperOverdue12940Ashgrove Catering30
3INV-8802Calder UtilitiesQueried471180Brightwell Paper30
4INV-8803Meridian FreightOverdue632450Calder Utilities14
5INV-8804Ashgrove CateringOn terms0405Meridian Freight45
6INV-8805Brightwell PaperOverdue38760Thornbury Print60
7INV-8806Thornbury PrintOverdue911320
8INV-8807Meridian FreightOn terms0580
9INV-8808Calder UtilitiesOverdue24215
FormulaResult
=AVERAGEIFS(E2:E9,C2:C9,"Overdue",D2:D9,">30")The typical invoice among those both overdue and past thirty days.1510
=COUNTIFS(C2:C9,"Overdue",D2:D9,">30")How many rows that average was taken over. Worth reporting beside it.3
=AVERAGEIFS(D2:D9,C2:C9,"Overdue")Average age of the overdue rows only.45.6

Notes

  • Every range must be the same size, including the one being averaged.
  • Matching no rows gives an error, not nought.