Where is Subtotal in Excel? Location and Usage Guide
In this article
The Subtotal feature in Excel is located in the Data tab, within the Outline group. It allows you to automatically calculate totals, averages, or counts for grouped categories of data without writing manual formulas. To use it, your data must first be sorted by the column you want to group.
What You'll Need
- A computer with Microsoft Excel installed.
- A dataset with organized columns and rows (a table or range).
- A specific column that contains categories (e.g., "Region," "Department," or "Month") that you want to group together.
Step-by-Step
- Prepare and Sort Your Data: This is the most critical step. The Subtotal tool only works if identical categories are grouped together. Select the column you want to group by, go to the Data tab, and click Sort A to Z (or Z to A). If you skip this, Excel will create a subtotal every time the value in that column changes, resulting in fragmented totals.
- Select Your Data Range: Click anywhere inside your data set. If your data is in a formal Excel Table (formatted with Insert > Table), you must first convert it back to a normal range because the Subtotal tool is disabled for official Tables. To do this, go to Table Design and click Convert to Range.
- Locate the Subtotal Tool: Click the Data tab on the top ribbon. Look to the far right in the Outline group and click the Subtotal button. (Note: Menu labels may differ slightly based on your version of Excel or region).
- Configure the Subtotal Settings: A dialog box will appear. Set the following three options:
- At each change in: Select the column you sorted in Step 1.
- Use function: Choose how you want to calculate the data (e.g., Sum, Count, Average, Max, or Min).
- Add subtotal to: Check the boxes for the columns that contain the numerical values you want to total.
- Apply the Subtotals: Click OK. Excel will insert new rows with the calculated totals and add an outline sidebar (levels 1, 2, and 3) to the left of your row numbers.
Common Mistakes
- Forgetting to Sort: The most common error is applying subtotals to an unsorted list. If your "Region" column goes "North, South, North," Excel will create three separate subtotals instead of grouping the two "North" entries together.
- Using Official Tables: Many users try to find the Subtotal button while a "Table" is selected. Because Tables have their own built-in "Total Row" feature, the Outline > Subtotal button is greyed out. You must convert the table to a range first.
- Applying Subtotals Multiple Times: If you apply a second subtotal (e.g., first by Region, then by Product), the second one will overwrite the first unless you uncheck the "Replace current subtotals" box in the dialog window.
Tips
- Use the Outline Levels: Use the small numbers (1, 2, 3) in the top-left corner of the spreadsheet to quickly collapse your data. Level 1 shows the Grand Total, Level 2 shows the Subtotals, and Level 3 shows all individual data rows.
- Combine with Filters: While Subtotals are great for viewing, if you need to perform complex analysis, consider using a Pivot Table, which is a more flexible way to achieve the same result.
- Removing Subtotals: If you want to go back to your original list, you don't have to delete rows manually. Go to Data > Subtotal and click the Remove All button in the bottom-left of the dialog box.
Troubleshooting
The Subtotal button is greyed out: This usually happens because your data is formatted as an official Excel Table. Select the table, go to the Table Design tab, and select Convert to Range. The button should now be clickable.
The totals are incorrect or fragmented: This is a sign that the data was not sorted correctly before the tool was applied. Click Remove All in the Subtotal menu, sort your category column again, and then re-apply the Subtotal tool.
I can't see the outline buttons (1, 2, 3): Ensure that your window is wide enough to see the row headers. If the outline is missing, you may have accidentally deleted the grouping rows. Re-apply the Subtotal tool to restore them.
Frequently Asked Questions
Is Subtotal the same as the SUBTOTAL function?
No. The Subtotal tool (found in the Data tab) is an automated feature that inserts rows and groups data. The =SUBTOTAL() function is a formula you type into a cell to sum only visible rows in a filtered list.
Can I use Subtotals on a Pivot Table?
No, the Subtotal tool is for standard data ranges. Pivot Tables have their own built-in subtotaling and grouping capabilities found under the Design tab in PivotTable Tools.
How do I remove all subtotals at once?
Go to the Data tab, click Subtotal in the Outline group, and then click the Remove All button in the dialog box that appears.
Why should I use Subtotals instead of a Pivot Table?
Subtotals are faster for a quick, linear view of data within the existing sheet. Pivot Tables are better for large datasets where you need to summarize data across multiple dimensions or create reports.
Does the Subtotal tool work on Mac?
Yes, the Subtotal tool is available in the Excel for Mac desktop application in the Data tab, following the same steps as the Windows version.