Grouping records in Excel allows you to condense large datasets by collapsing detailed rows or columns into a single summary line, making complex spreadsheets easier to navigate and analyze. To achieve this, you primarily use the Group feature found in the Data tab or the more automated Subtotal tool, provided your data is sorted by the category you wish to group. This creates a toggleable outline (indicated by plus and minus signs) that lets you switch between a high-level overview and a granular view of your records without hiding rows manually.

What You'll Need

  • Microsoft Excel installed on a Windows PC or Mac.
  • A dataset containing repetitive categories (e.g., a list of sales where multiple rows belong to the same "Region" or "Salesperson").
  • A clean data structure with clear column headers and no completely empty rows or columns within the data range.

Step-by-Step

Depending on your goal, you can group records manually for structural organization or use the Subtotal tool for mathematical summaries. Note that menu labels may differ slightly depending on your version of Excel or region.

Method 1: Manual Grouping for Organization

Use this method when you want to create a collapsible section for specific rows that you have already organized.

  1. Prepare Your Data: Ensure the rows you want to group are positioned together. If you want to group all "North Region" records, make sure they are all in consecutive rows.
  2. Select the Rows: Click and drag your mouse over the row headers (the numbers on the far left) to highlight the specific records you want to collapse. Do not include the summary row or the header row in this selection, as you want those to remain visible when the group is closed.
  3. Access the Group Command: Navigate to the Data tab on the top ribbon. In the Outline group (usually located on the far right), click the Group button.
  4. Confirm the Outline: You will now see a gray bar and a minus sign (–) appear to the left of the row numbers. Click the minus sign to collapse the records; it will turn into a plus sign (+), which you can click to expand them again.
  5. Create Multiple Groups: Repeat this process for other categories in your sheet. You can create nested groups (groups within groups) by selecting a subset of an existing group and clicking Group again.

Method 2: Automatic Grouping with Subtotals

Use this method when you need Excel to automatically group records and calculate sums, averages, or counts for each group.

  1. Sort Your Data: This is the most critical step. Select your data range, go to the Data tab, and click Sort. Sort the column you intend to group by (e.g., sort by "Category" A to Z). If the data is not sorted, Excel will create a new group every time the value in that column changes.
  2. Open the Subtotal Menu: With your data still selected, go to the Data tab and click the Subtotal button (found in the Outline group).
  3. Configure the Settings: A dialog box will appear. Set the following:
    • At each change in: Select the column you just sorted (e.g., "Category").
    • Use function: Choose the calculation you need, such as Sum, Count, or Average.
    • Add subtotal to: Check the boxes for the columns containing the numeric values you want to calculate.
  4. Apply the Grouping: Click OK. Excel will automatically insert subtotal rows and create an outline on the left side of the screen.
  5. Use Outline Levels: Look for the small numbers (1, 2, 3) in the top-left corner of the spreadsheet. Clicking 1 shows only the Grand Total; 2 shows the group totals; 3 shows all individual records.

Common Mistakes

One of the most frequent errors is attempting to use the Subtotal tool without sorting the data first. If your list has "East" in row 2, "West" in row 3, and "East" again in row 4, Excel will create three separate groups instead of two. Always ensure your grouping column is perfectly sorted.

Another common mistake is selecting the summary row when manually grouping. If you include the row that says "Total" in your selection and then click Group, that total row will disappear when you collapse the group, leaving you with no summary visible. Always select only the detail rows that should be hidden.

Users also frequently confuse Grouping with Filtering. Filtering removes rows from view based on criteria, whereas Grouping keeps them in the sheet but collapses them into a hierarchy. If you need to see only one category at a time and don't need a summary row, Filtering is the better tool.

Tips

To quickly clear all groupings and return your sheet to a standard flat list, go to the Data tab, click the arrow under the Ungroup button, and select Clear Outline. This removes all plus/minus signs and subtotal structures in one click.

If you are working with extremely large datasets, consider using a Pivot Table instead of the Subtotal tool. Pivot Tables provide a more flexible way to group records by date (grouping by month, quarter, or year) or by custom categories without altering the original data layout.

For better visual clarity, apply a bold font or a light background fill to your subtotal or summary rows. This helps the eye distinguish between the grouped totals and the raw data when the outline is expanded.

Troubleshooting

The Group button is grayed out: This usually happens if the worksheet is protected or if you are currently editing a cell (the cursor is blinking inside a cell). Press Enter to finish editing the cell or check the Review tab to see if the sheet is protected. If it is, you must unprotect it before you can modify the outline.

The plus/minus signs are not appearing: Check if you have hidden columns or rows that are interfering with the outline display. Also, ensure that you have not disabled the outline symbols in the Excel options. Go to File > Options > Advanced, scroll down to the Display options for this worksheet section, and ensure that "Show outline symbols if an outline is applied" is checked.

Subtotals are calculating incorrectly: Double-check that the columns you are summing are formatted as numbers and not as text. If a number is stored as text, Excel will ignore it in the Sum calculation, leading to an incorrect total. You can fix this by selecting the column and changing the format to "Number" or "Currency" via the Home tab.

I can't find the Subtotal button: If you have converted your data range into an official Excel Table (using Ctrl+T or Insert > Table), the Subtotal button will be disabled. The Subtotal tool does not work inside an Excel Table. To fix this, click anywhere in your table, go to the Table Design tab, and click Convert to Range. Once it is a standard range again, the Subtotal button will be available.

Frequently Asked Questions

Can I group records by date?

Yes, but the Subtotal tool treats every unique date as a separate group. To group by month or year, it is best to use a Pivot Table, where you can right-click a date field and select Group to choose the time interval.

Is there a keyboard shortcut for grouping?

Yes, you can use Shift + Alt + Right Arrow to group selected rows or columns, and Shift + Alt + Left Arrow to ungroup them.

Does grouping delete any of my data?

No, grouping only changes the visibility of the rows or columns. All your data remains intact; it is simply hidden behind a toggle button.

Can I group columns instead of rows?

Yes. The process is identical: select the column letters at the top, go to the Data tab, and click Group. This is useful for hiding detailed monthly data to show only quarterly totals.

How do I remove just one group without removing all of them?

Select the rows that belong to that specific group, go to the Data tab, and click Ungroup. This will remove the outline for that selection while leaving other groups untouched.