Google Sheets AVERAGEIF function

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

Syntax

English Sheets

=AVERAGEIF(criteria_range, criterion, [average_range])

Spanish Sheets (Mexico locale)

=PROMEDIO.SI(intervalo_criterio, criterio, [intervalo_promedio])

Spanish Sheets (Spain, Latin America)

=PROMEDIO.SI(intervalo_criterio; criterio; [intervalo_promedio])

ArgumentWhat it is
criteria_rangeWhere the condition is checked.
criterionThe condition.
average_rangeoptionalWhat gets averaged; if omitted, the same range.

Example

AVERAGEIF works like SUMIF but averages instead of adding: AVERAGEIF(criteria_range, criterion, average_range).

=AVERAGEIF(B2:B11,"Monterrey",D2:D11)

Common mistake

If no row meets the condition it returns #DIV/0!. Wrap it in IFERROR when 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: AVERAGEIF(criteria_range, criterion, average_range).

Example=AVERAGEIF(B2:B11,"CDMX",D2:D11)PROMEDIO.SI = AVERAGEIF
Step 1/2

In G2, calculate the average amount of the Monterrey orders.

G2
ABCDEFGH
1OrderCitySellerAmount
2P-101MonterreyCarmen1200Average Monterrey order
3P-102GuadalajaraJorge850Lucía’s average order
4P-103CDMXCarmen2300
5P-104MonterreyLucía640
6P-105CDMXJorge1750
7P-106GuadalajaraLucía980
8P-107MonterreyJorge1500
9P-108CDMXLucía410
10P-109GuadalajaraCarmen1320
11P-110MonterreyCarmen760
12

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 Google Sheets it is PROMEDIO.SI. The formula =AVERAGEIF(B2:B11,"Monterrey",D2:D11) is written =PROMEDIO.SI(B2:B11;"Monterrey";D2:D11) (or with commas under a Mexico locale).
Why does AVERAGEIF use semicolons in some spreadsheets?
It depends on each spreadsheet's locale, under File > Settings. Where the comma is the decimal mark (Spain, much of South America), arguments are separated by semicolons. Mexico and United States locales use commas.
What is the most common AVERAGEIF mistake?
If no row meets the condition it returns #DIV/0!. Wrap it in IFERROR when that can happen.