How can I use Google Sheets to sum values by category?

Google Sheets is a powerful tool that allows users to organize and analyze data in a spreadsheet format. One useful feature of Google Sheets is the ability to sum values by category. This means that users can easily calculate the total value of a specific category of data, such as sales or expenses. To use this feature, users can use the SUMIF or SUMIFS function, which allows them to specify the criteria for the category they want to sum. This can be a convenient and efficient way to quickly analyze and understand data in a spreadsheet and make data-driven decisions.

Google Sheets: Sum Values by Category


Often you may want to sum the values of some dataset in Google Sheets based on a category or group.

For example, suppose we have the following dataset and we’d like to sum the total “points” by team:

The following step-by-step example shows how to do so.

Step 1: Enter the Data

First, enter the data values into Google Sheets:

Step 2: Find the Unique Categories

Next, we need to use the =UNIQUE(Range) function to produce a list of unique values in a certain range.

In our example, this will produce a list of unique teams:

Step 3: Find the Sum by Category

Next, we will use the SUMIF(range, criterion, sum_range) function to find the sum of the points scored by each team:

Sum by category in Google Sheets

This tells us:

  • The total points scored by players on the Lakers is 21.6.
  • The total points scored by players on the Mavericks is 56.4.
  • The total points scored by players on the Spurs is 48.8.
  • The total points scored by players on the Warriors is 65.

Additional Resources

x