Formatting Issues

How to Fix Excel Subtotals Appearing Above Detail Rows

Kushani NimanthikaKushani Nimanthika Oct 7, 2026 872 views

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.

How to Fix Excel Subtotals Appearing Above Detail Rows
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.
Before you start

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.

Solution 1Recommended

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.

1
Select your data

Click any cell inside the dataset that currently contains the incorrectly placed subtotals.

2
Open the Subtotal dialog

Navigate to the Data tab on the Excel ribbon, look for the Outline group on the far right, and click on 'Subtotal'.

3
Modify the placement setting

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.

4
Apply changes

Click OK. Excel will immediately recalculate the outline and move your subtotal rows below their respective detail data.

Adjust the Subtotal Placement Settings
Reverting Layout: If you ever decide you want the summaries back on top (which can be useful for quickly viewing totals without scrolling), simply uncheck the 'Summary below data' box in the same menu.
Organize Data with WPS

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. 1. Open your file: Launch WPS Spreadsheet and open the document containing your dataset.
  2. 2. Access the Subtotal tool: Select a cell in your data, go to the Data tab on the top ribbon, and click Subtotal.
  3. 3. Configure your layout: Set your grouping criteria, check 'Summary below data' to place totals at the bottom, and click OK.
Fully compatible with Microsoft Excel (.xlsx, .xls) files and their existing subtotal layouts.Intuitive Data tab for quick sorting, filtering, and grouping.Free, lightweight, and fast alternative for daily data analysis and formatting tasks.
microsoft office alternative - wps office

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.