How to Fix Excel Subtotals Appearing Above Detail Rows
Question details
The user wants to know why subtotal rows are generated above detail data and how to adjust the layout so that summaries appear below the data.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Applying automatic subtotals to a dataset and adjusting the display layout of the summary rows.
- Observed behavior
- Subtotal rows appear above the related detail rows instead of at the bottom of each grouped section.
Ensure your dataset is properly sorted by the column you are using to group your subtotals. If the data is not sorted, the subtotal tool will create unnecessary groups.
Adjust the Subtotal Placement Settings
Change the built-in subtotal settings to force summary rows to appear below your detail data.
By default, Excel usually places subtotals below the data. If they are appearing above the detail rows, it means the placement setting in the Subtotal dialog box has been altered.
Click any cell inside the dataset that currently contains the incorrectly placed subtotals.
Navigate to the Data tab on the Excel ribbon, look for the Outline group on the far right, and click on 'Subtotal'.
In the Subtotal dialog box, look at the bottom for a checkbox labeled 'Summary below data'. Check this box to ensure subtotals are placed underneath the detail rows.
Click OK. Excel will immediately recalculate the outline and move your subtotal rows below their respective detail data.

Manage Subtotals Easily with WPS Spreadsheet
WPS Office Spreadsheet provides an intuitive interface for adding, managing, and positioning subtotals in your datasets. It processes outline data identically to Excel, giving you full control over where your summaries appear.
- 1. Open your file: Launch WPS Spreadsheet and open the document containing your dataset.
- 2. Access the Subtotal tool: Select a cell in your data, go to the Data tab on the top ribbon, and click Subtotal.
- 3. Configure your layout: Set your grouping criteria, check 'Summary below data' to place totals at the bottom, and click OK.

Frequently Asked Questions
Why is the Subtotal button grayed out in Excel?
The Subtotal feature cannot be used if your data is formatted as an official Excel Table (Insert > Table). To use subtotals, you must first convert the table back to a standard range by right-clicking inside the table, selecting 'Table', and clicking 'Convert to Range'.
How do I completely remove subtotals from my worksheet?
To remove all subtotals, click any cell within your outlined data, go to the Data tab, click Subtotal, and then click the 'Remove All' button located at the bottom left of the Subtotal dialog box.
Can I copy only the subtotal rows without the detail data?
Yes. First, use the outline numbers (1, 2, 3) on the left margin to collapse the data so only subtotals are visible. Select the visible cells, press Alt+; (to select only visible cells), press Ctrl+C to copy, and then paste them to your new location.




