“How can I calculate the average by group in Excel?” 2

“How can I calculate the average by group in Excel?”

Calculating the average by group in Excel involves using the AVERAGEIF function, which allows you to specify a criteria and calculate the average for a specific group or category of data. This function can be useful for organizing and analyzing data in a spreadsheet, as it provides an efficient way to determine the average value for each group within a larger dataset. By following the proper syntax and selecting the appropriate data ranges, you can easily calculate the average by group in Excel and gain valuable insights from your data.

Calculate the Average by Group in Excel


The following step-by-step example shows how to calculate the average value by group in Excel.

Example: Calculate Average by Group in Excel

First, let’s enter the following dataset that shows the total points scored by various basketball players:

Now suppose we’d like to find the average value of the points scored, grouped by team.

To do so, we can use the UNIQUE() function to first create a list of the unique teams.

We’ll type the following formula into cell E2:

=UNIQUE(B2:B12)

Once we press Enter, a list of unique team names will be displayed:

Next, we can use the =AVERAGEIF() function to find the average of points scored by players on each team:

=AVERAGEIF($B$2:$B$12, E2, $C$2:$C$12)

We’ll type this formula into cell F2 and copy and paste it down to each remaining cell in column F:

average by group in Excel

Column E displays each of the unique teams and column F displays the average value of the points scored by each team.

We can verify these results are correct by manually calculating the average for one of the teams.

For example, the average points scored by players on the Spurs team would be:

This matches the value calculated using the formula.

Note: You can find the complete documentation for the AVERAGEIF formula in Excel .

Additional Resources

The following tutorials explain how to perform other common tasks in Excel:

Cite this article

stats writer (2024). “How can I calculate the average by group in Excel?”. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/how-can-i-calculate-the-average-by-group-in-excel/

stats writer. "“How can I calculate the average by group in Excel?”." PSYCHOLOGICAL SCALES, 30 Jun. 2024, https://scales.arabpsychology.com/stats/how-can-i-calculate-the-average-by-group-in-excel/.

stats writer. "“How can I calculate the average by group in Excel?”." PSYCHOLOGICAL SCALES, 2024. https://scales.arabpsychology.com/stats/how-can-i-calculate-the-average-by-group-in-excel/.

stats writer (2024) '“How can I calculate the average by group in Excel?”', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/how-can-i-calculate-the-average-by-group-in-excel/.

[1] stats writer, "“How can I calculate the average by group in Excel?”," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, June, 2024.

stats writer. “How can I calculate the average by group in Excel?”. PSYCHOLOGICAL SCALES. 2024;vol(issue):pages.

Download Post (.PDF)
Slide Up
x
PDF
Scroll to Top