AVERAGEIF
The AVERAGEIF
function in Google Sheets is a powerful tool to calculate the average of a range depending on specified criteria. Whether you want to find the average sales of a particular product, the average grades of students who scored above a certain threshold, or any other scenario where you need to filter data before calculating the average, the AVERAGEIF
function is here to help. Dive into our comprehensive guide to master its application.
Function Syntax and Parameters
Syntax: AVERAGEIF(criteria_range, criterion, [average_range])
Parameters:
criteria_range
: The range to evaluate against the specified criterion.criterion
: The pattern or condition to match within thecriteria_range
.average_range
(optional): [Optional] The range to average if the corresponding cell in thecriteria_range
meets the specified criterion.
Step-by-Step Tutorial
-
Using
AVERAGEIF
with criteria and average range:- Example: If
A1:A5
has the names of products, andB1:B5
has their corresponding sales figures, then=AVERAGEIF(A1:A5, "Product A", B1:B5)
will return the average sales of "Product A".
- Example: If
-
Using
AVERAGEIF
with criteria range only:- Example: If
A1:A5
has the names of products, and you want to find the average sales of products starting with the letter "P", then=AVERAGEIF(A1:A5, "P*")
will return the average sales of products starting with "P".
- Example: If
Use Cases and Scenarios
- Sales Analysis: Find the average sales of a specific product or category.
- Grade Calculation: Calculate the average grades of students who scored above a certain threshold.
- Survey Analysis: Compute the average ratings for a particular question or category.
Related Functions
AVERAGE
: Calculate the average of a given set of numbers.SUMIF
: Sum the values in a range that meet certain criteria.COUNTIF
: Count the number of cells in a range that meet a specific criterion.