Excel AVERAGEIF function

Averages only the rows that meet a condition. In Spanish Excel it is called PROMEDIO.SI.

Syntax

English Excel

=AVERAGEIF(range, criteria, [average_range])

Spanish Excel (Mexico)

=PROMEDIO.SI(rango, criterio, [rango_promedio])

Spanish Excel (Spain, Latin America)

=PROMEDIO.SI(rango; criterio; [rango_promedio])

ArgumentWhat it is
rangeThe cells checked against the condition.
criteriaThe condition.
average_rangeoptionalThe cells to average.

Example

AVERAGEIF works like SUMIF but averages instead of adding.

=AVERAGEIF(B2:B9,"Sales",C2:C9)

Common mistake

If no row matches, it returns #DIV/0!. Wrap it in IFERROR if that can happen.

About Ads

This site uses Google AdSense to display ads. These ads help us keep WebHerramientas completely free. Ads are managed by Google and meet strict security and privacy standards.

Advertising
Loading ad...

Ads help us keep WebHerramientas free for everyone

Practice AVERAGEIF

Type the formula in the sheet and check it instantly. Spanish or English function names both work. See all lessons

AVERAGEIF

AVERAGEIF works like SUMIF but averages instead of adding.

Example=AVERAGEIF(B2:B9,"Ventas",C2:C9)PROMEDIO.SI = AVERAGEIF

In F2, calculate the average salary in the Sales department.

F2
ABCDEFG
1EmployeeDepartmentSalary
2MarisolSales18,500Average salary in Sales
3FernandoIT32,000
4GabrielaSales21,000
5HugoWarehouse14,200
6DanielaIT29,500
7ÓscarSales16,800
8NataliaWarehouse15,100
9RaúlSales23,400
10

Tip: while typing, click a cell or drag across several to insert their reference.

Frequently asked questions

What is AVERAGEIF called in Spanish?
In Spanish Excel it is PROMEDIO.SI. The formula =AVERAGEIF(B2:B9,"Sales",C2:C9) is written =PROMEDIO.SI(B2:B9;"Ventas";C2:C9) (or with commas in Mexico).
Why does AVERAGEIF use semicolons in some Excel versions?
It depends on regional settings. Where the comma is the decimal mark (Spain, much of South America), Excel separates arguments with semicolons. English Excel and Mexican Spanish Excel use commas.
What is the most common AVERAGEIF mistake?
If no row matches, it returns #DIV/0!. Wrap it in IFERROR if that can happen.