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])
| Argument | What it is |
|---|---|
| range | The cells checked against the condition. |
| criteria | The condition. |
| average_rangeoptional | The 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.
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.
In F2, calculate the average salary in the Sales department.
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | Employee | Department | Salary | ||||
| 2 | Marisol | Sales | 18,500 | Average salary in Sales | |||
| 3 | Fernando | IT | 32,000 | ||||
| 4 | Gabriela | Sales | 21,000 | ||||
| 5 | Hugo | Warehouse | 14,200 | ||||
| 6 | Daniela | IT | 29,500 | ||||
| 7 | Óscar | Sales | 16,800 | ||||
| 8 | Natalia | Warehouse | 15,100 | ||||
| 9 | Raúl | Sales | 23,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.