# How to Subtotal Based on Column Value in Excel 2010

... Pixland/Pixland/Getty Images

Excel 2010 allows you to automatically add subtotal rows when you want to break your numbers into categories defined by a particular column. For example, if your rows contain individual basketball players' scores for each game, Excel can create separate subtotals for each player showing their season totals, as long as the player names are in the same column. Before you can create the subtotals, you must sort your data by the column you plan to use for your categories.

## 2Click anywhere in the Excel data

Click anywhere in the Excel data containing the numbers you want to subtotal.

## 3Click Sort Filter

Click "Sort & Filter" on the Home tab, and then select "Custom Sort" to open the Sort dialog box.

## 4Change the Sort

Change the "Sort By" setting to the column containing your subtotal categories. For the example, when finding season totals for individual basketball players, select the column that contains the players' names.

## 5Click to sort the data

Click "OK" to sort the data.

## 7Click anywhere in the data again

Click anywhere in the data again.

## 8Select the Data'' tab

Select the "Data" tab, and then click "Subtotals" to bring up the Subtotal dialog box.

## 9Change the

Change the "At Each Change In" setting to the name of the column that contains your subtotal categories. Select the same column you chose earlier to sort the data.

## 10Check the box

Check the box in the "Add Subtotal To" field that corresponds to the column containing the numbers you want to subtotal. For the previous example with the basketball players, select the column that contains the number of points per game.

## 11Click to create the subtotals

Click "OK" to create the subtotals. Excel displays the subtotals in new rows after each category.

Alan Sembera began writing for local newspapers in Texas and Louisiana. His professional career includes stints as a computer tech, information editor and income tax preparer. Sembera now writes full time about business and technology. He holds a Bachelor of Arts in journalism from Texas A&M University.