How to Use the AVERAGEIF Function in Excel

Today, we will delve into the AVERAGEIF function in Microsoft Excel and Google Sheets, which is designed to compute the average of a range based on a specific criterion.

Overview

The AVERAGEIF function enables you to calculate the mean value of cells that satisfy a particular condition.

Syntax

The syntax for the AVERAGEIF function varies slightly between Excel and Google Sheets:

Excel:

=AVERAGEIF(range, criteria, [average_range])
  • range: The group of cells against which the criteria are evaluated.
  • criteria: The condition that must be fulfilled. This can be a number, expression, cell reference, or text that identifies which cells will contribute to the average.
  • average_range: [Optional] The cells from which the average is actually calculated. If not specified, the cells in the range are used by default.

Google Sheets:

=AVERAGEIF(range, criterion, [average_range])
  • range: The range of cells evaluated by the criterion.
  • criterion: The required condition to be met. Like in Excel, this may be a number, expression, reference, or text that defines the cells to be averaged.
  • average_range: [Optional] Specifies the range from which the values are averaged. If omitted, the range stipulated for evaluation is used instead.

Examples

Let’s examine some practical applications of the AVERAGEIF function in both Excel and Google Sheets.

Example 1: Simple AVERAGEIF

Consider a range of student test scores in cells A1 to A4, and you wish to determine the average score for all values greater than or equal to 80.

Student Score
Student 1 85
Student 2 70
Student 3 90
Student 4 80

Excel:

=AVERAGEIF(A1:A4, ">=80")

This formula calculates the average of scores that are greater than or equal to 80 from cells A1 to A4.

Google Sheets:

=AVERAGEIF(A1:A4, ">=80")

Example 2: AVERAGEIF with Specified Average Range

Imagine a scenario with a list of sales in column B and corresponding salespeople in column A. You want to compute the average sale amount for a specific salesperson, designated as “A”.

Salesperson Sales
A 100
B 150
A 200
B 120

Excel:

=AVERAGEIF(A1:A4, "A", B1:B4)

This formula computes the average sales where the salesperson is listed as “A” from the A1 to A4 range.

Google Sheets:

=AVERAGEIF(A1:A4, "A", B1:B4)

The AVERAGEIF function is an incredibly useful tool for aggregating data based on specific conditions, streamlining the process of data analysis.

More information: https://support.microsoft.com/en-us/office/averageif-function-faec8e2e-0dec-4308-af69-f5576d8ac642

Other functions
Returns the average of the absolute deviations of data points from their mean
Returns the average of its arguments
Returns the average of its arguments, including numbers, text, and logical values
Returns the average (arithmetic mean) of all cells that meet multiple criteria
Returns the beta cumulative distribution function
Returns the inverse of the cumulative distribution function for a specified beta distribution
Returns the individual term binomial distribution probability
Returns the probability of a trial result using a binomial distribution
Returns the smallest value for which the cumulative binomial distribution is less than or equal to a criterion value
Returns the cumulative beta probability density function
Returns the one-tailed probability of the chi-squared distribution
Returns the cumulative beta probability density function
Returns the inverse of the one-tailed probability of the chi-squared distribution
Returns the test for independence
Returns the confidence interval for a population mean
Returns the confidence interval for a population mean, using a Student's t distribution
Returns the correlation coefficient between two data sets
Counts how many numbers are in the list of arguments
Counts how many values are in the list of arguments
Counts the number of blank cells within a range
Counts the number of cells within a range that meet the given criteria
Counts the number of cells within a range that meet multiple criteria
Returns covariance, the average of the products of paired deviations
Returns the sample covariance, the average of the products deviations for each data point pair in two data sets
Returns the sum of squares of deviations
Returns the exponential distribution
Returns the F probability distribution
Returns the F probability distribution
Returns the inverse of the F probability distribution
Returns the inverse of the F probability distribution
Returns the result of an F-test
Returns the inverse of the F probability distribution
Returns the Fisher transformation
Returns the inverse of the Fisher transformation
Returns a value along a linear trend
Returns a future value based on existing (historical) values by using the AAA version of the Exponential Smoothing (ETS) algorithm
Returns a confidence interval for the forecast value at the specified target date
Returns the length of the repetitive pattern Excel detects for the specified time series
Returns a statistical value as a result of time series forecasting
Returns a future value based on existing values
Returns a frequency distribution as a vertical array
Returns the Gamma function value
Returns the gamma distribution
Returns the inverse of the gamma cumulative distribution
Returns the natural logarithm of the gamma function, Γ(x)
Returns the natural logarithm of the gamma function, Γ(x)
Returns 05 less than the standard normal cumulative distribution
Returns the geometric mean
Returns values along an exponential trend
Returns the harmonic mean
Returns the hypergeometric distribution
Returns the intercept of the linear regression line
Returns the kurtosis of a data set
Returns the k-th largest value in a data set
Returns the parameters of a linear trend
Returns the parameters of an exponential trend
Returns the cumulative lognormal distribution
Returns the inverse of the lognormal cumulative distribution
Returns the maximum value in a list of arguments
Returns the maximum value in a list of arguments, including numbers, text, and logical values
Returns the maximum value among cells specified by a given set of conditions or criteria
Returns the median of the given numbers
Returns the minimum value in a list of arguments
Returns the smallest value in a list of arguments, including numbers, text, and logical values
Returns the minimum value among cells specified by a given set of conditions or criteria
Returns a vertical array of the most frequently occurring, or repetitive values in an array or range of data
Returns the most common value in a data set
Returns the negative binomial distribution
Returns the normal cumulative distribution
Returns the standard normal cumulative distribution
Returns the inverse of the standard normal cumulative distribution
Returns the inverse of the normal cumulative distribution
Returns the Pearson product moment correlation coefficient
Returns the k-th percentile of values in a range, where k is in the range 01, exclusive
Returns the k-th percentile of values in a range
Returns the rank of a value in a data set as a percentage (01, exclusive) of the data set
Returns the percentage rank of a value in a data set
Returns the number of permutations for a given number of objects
Returns the number of permutations for a given number of objects (with repetitions) that can be selected from the total objects
Returns the value of the density function for a standard normal distribution
Returns the Poisson distribution
Returns the probability that values in a range are between two limits
Returns the quartile of the data set, based on percentile values from 01, exclusive
Returns the quartile of a data set
Returns the rank of a number in a list of numbers
Returns the rank of a number in a list of numbers
Returns the square of the Pearson product moment correlation coefficient
Returns the skewness of a distribution
Returns the skewness of a distribution based on a population: a characterization of the degree of asymmetry of a distribution around its mean
Returns the slope of the linear regression line
Returns the k-th smallest value in a data set
Returns a normalized value
Calculates standard deviation based on the entire population
Estimates standard deviation based on a sample
Estimates standard deviation based on a sample, including numbers, text, and logical values
Calculates standard deviation based on the entire population, including numbers, text, and logical values
Returns the standard error of the predicted y-value for each x in the regression
Returns the Percentage Points (probability) for the Student t-distribution
Returns the Percentage Points (probability) for the Student t-distribution
Returns the Student's t-distribution
Returns the t-value of the Student's t-distribution as a function of the probability and the degrees of freedom
Returns the inverse of the Student's t-distribution
Returns the probability associated with a Student's t-test
Returns values along a linear trend
Returns the mean of the interior of a data set
Calculates variance based on the entire population
Estimates variance based on a sample
Estimates variance based on a sample, including numbers, text, and logical values
Calculates variance based on the entire population, including numbers, text, and logical values
Returns the Weibull distribution
Returns the one-tailed probability-value of a z-test