Table of Contents
A weighted average IF formula in Google Sheets is a mathematical calculation that allows users to determine the average value of a set of data while taking into account the relative importance or weight of each individual data point. This formula can be used to calculate the average of a group of numbers that meet certain criteria, allowing for more accurate and precise calculations. To use this formula, users must first define the criteria for the data points to be included in the calculation and assign a weight to each data point. The formula then multiplies each data point by its corresponding weight, adds the results, and divides by the sum of the weights to determine the weighted average. This feature in Google Sheets can be helpful for organizing and analyzing data in a variety of situations, such as financial calculations, statistical analysis, and academic grading.
Google Sheets: Weighted Average IF Formula
You can use the following syntax in Google Sheets to apply a weighted average IF formula:
=SUMPRODUCT(--(A2:A7="A"), B2:B7, C2:C7)/SUMIF(A2:A7, "A", C2:C7)
This formula calculates the weighted average of the values in the range B2:B7, using C2:C7 as the weights, only for the cells where A2:A7 are equal to “A”.
The following example shows how to use this formula in practice.
Example: Weighted Average IF Formula in Google Sheets
First, let’s enter the following data that shows the scores for two students (Student A and Student B) on three different exams:

Next, we’ll use the following formula to calculate the weighted average of exam scores for student A only:
=SUMPRODUCT(--(A2:A7="A"), B2:B7, C2:C7)/SUMIF(A2:A7, "A", C2:C7)
The following screenshot shows how to use this formula in practice:

The weighted average of exam scores for student A is 78.
We can verify this is correct by manually computing the weighted average exam score for student A.
Recall that we use the following formula for weighed average:
Weighed Average = ΣwiXi / Σwi
where:
- wi = the weight values
- Xi = the data values
- Weighed Average for Student A = ΣwiXi / Σwi
- Weighed Average for Student A = (2*60 + 5*90 + 70*3) / (2+5+3)
- Weighed Average for Student A = 78
This matches the value that we calculated using the formula in Google Sheets.
The following tutorials explain how to perform other common tasks in Google Sheets:
Cite this article
stats writer (2024). How can I use a weighted average IF formula in Google Sheets?. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/how-can-i-use-a-weighted-average-if-formula-in-google-sheets/
stats writer. "How can I use a weighted average IF formula in Google Sheets?." PSYCHOLOGICAL SCALES, 23 Jun. 2024, https://scales.arabpsychology.com/stats/how-can-i-use-a-weighted-average-if-formula-in-google-sheets/.
stats writer. "How can I use a weighted average IF formula in Google Sheets?." PSYCHOLOGICAL SCALES, 2024. https://scales.arabpsychology.com/stats/how-can-i-use-a-weighted-average-if-formula-in-google-sheets/.
stats writer (2024) 'How can I use a weighted average IF formula in Google Sheets?', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/how-can-i-use-a-weighted-average-if-formula-in-google-sheets/.
[1] stats writer, "How can I use a weighted average IF formula in Google Sheets?," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, June, 2024.
stats writer. How can I use a weighted average IF formula in Google Sheets?. PSYCHOLOGICAL SCALES. 2024;vol(issue):pages.
