How to Group Rows in Excel Online: A Step-by-Step Guide

How-to basics · Updated November 18, 2026

To group rows in Excel Online, select their row numbers, choose Data > Group, and then use the outline control beside the rows to collapse or expand them. Grouping creates a reversible outline: it hides detail rows temporarily without deleting them or combining their values. Open the workbook in Excel for the web with editing access, and make sure the rows you want to group are in a normal worksheet range.

What You’ll Need

  • A workbook open in Excel for the web in a browser, with permission to edit it.
  • A set of adjacent rows that you want to show or hide together. Grouping works best when the rows are arranged as detail beneath a heading or summary row.
  • A normal worksheet range. If the rows are part of an Excel table and the Group command is unavailable, see the troubleshooting section before changing the table.

Step-by-Step

  1. Open the worksheet and identify the detail rows. Open the workbook at Microsoft 365 or OneDrive, then select the worksheet tab that contains the data. Look at the row numbers along the left edge and decide exactly which consecutive rows should collapse. For example, if row 5 is a heading and rows 6 through 10 contain its supporting details, you would group rows 6 through 10 so the heading remains visible when they are hidden. Save or confirm any pending edits before proceeding if other people are working in the file.
  2. Select the rows using their row headers. Click the number of the first row you want in the group, then drag down the row-number strip to the last row. You can also click the first row number, hold Shift, and click the last row number to select a continuous span. The entire row should be highlighted across the sheet. Select rows by their numbered headers rather than dragging through cells in just one column; that helps ensure the outline applies to the intended worksheet rows, not only a small cell selection.
  3. Check the selection before grouping. Confirm that the highlighted row numbers match the detail section and that you have not included a heading or a neighboring section by mistake. You can group one uninterrupted block at a time. If the details you want to hide are separated by blank or unrelated rows, make separate groups instead of including those rows in one large selection. This makes the outline easier to understand and reduces the chance of hiding information that should stay visible.
  4. Choose the Group command. With the row headers selected, open the Data tab on the ribbon and choose Group. If Excel asks whether to group Rows or Columns, choose Rows. Excel for the web may show the command in a compact or simplified ribbon, so expand the ribbon or check the remaining commands on the Data tab if you do not see it immediately. The command should create an outline level for the selected rows.
  5. Locate the outline controls. After grouping, look just to the left of the row numbers for a bracket or line marking the grouped section and a small minus control. The control is associated with the outline, not with a cell in your data. If the worksheet already contains groups, there may be several brackets, level buttons, or plus and minus controls. Check which bracket spans the rows you selected before clicking so you operate on the right group.
  6. Collapse the group to hide its detail rows. Click the minus control for the new group. Excel hides those rows and changes the control to a plus. The remaining rows shift together on screen, but their contents are still in the worksheet. If you grouped rows 6 through 10 beneath a heading in row 5, collapsing should leave the heading visible while concealing the detail rows. Other rows do not move permanently and no data is removed.
  7. Expand the group when you need the details. Click the plus control beside the collapsed section. The hidden rows reappear, and the control changes back to a minus. You can expand and collapse a group as often as needed while reviewing the workbook. If you cannot see the plus or minus, make sure the row-header margin is visible and that the worksheet is not horizontally scrolled in a way that makes the outline margin difficult to spot.
  8. Save and check the workbook view. Excel for the web usually saves edits automatically, but wait for the save indicator or check the workbook status before closing the browser tab. Expand the group once to verify that the correct rows are present, then collapse it again if that is the view you want to leave for other readers. Remember that grouping changes the worksheet’s visible layout; it does not create a separate summary or calculate totals.

To remove a group later: select its row headers, open Data > Ungroup, and choose Rows if Excel asks. Ungrouping removes that outline relationship; it does not delete the rows or their contents. If you only want to show the information temporarily, use the plus control instead of ungrouping.

Common Mistakes

  • Selecting cells instead of row headers. A selection inside cells may not include the full rows you intended. Click the numbered headers at the far left, and check that the complete row bands are highlighted before using Group.
  • Grouping the heading with its details. If the heading should remain visible as a label when the details are collapsed, leave it out of the selection. Group only the rows beneath it. If you include the heading, it may disappear along with the details, making the remaining worksheet harder to interpret.
  • Expecting Group to add a total. Grouping is a display and navigation feature, not a calculation. It does not sum, count, or summarize the hidden rows. Add a formula or use an appropriate summary feature separately if you need a total.
  • Confusing grouping with hiding rows. Both can make rows disappear from view, but grouping adds outline controls that let readers expand and collapse a section. Hiding rows through a row-header menu does not create the same group bracket. Use Group when readers need a clear, reversible outline.
  • Including unrelated rows in one selection. A single group hides every selected row, including blank lines or another section inside the selection. Make smaller groups for separate blocks, and verify the row numbers before you collapse them.
  • Assuming a collapsed group is deleted or unavailable to others. The rows still exist and can be expanded. Grouping is not a security or privacy control: anyone with access to the workbook may be able to reveal the details.

Tips

  • Keep headings outside the detail group. A clear pattern is a heading or subtotal row followed by the detail rows it describes. Grouping only the detail makes it easier to understand what the collapsed section contains.
  • Use separate groups for separate topics. If a worksheet has several departments, months, or project phases, group each block independently. Readers can then open one section without revealing every other section. Avoid making a single oversized group when smaller blocks would be more useful.
  • Use nested groups only when they add clarity. For example, you might group several daily rows within each week and then group the weekly sections within a month. Create the smaller detail groups first, then the larger group around them. Nested outlines can be harder to navigate, so use visible labels and check the plus and minus controls carefully.
  • Leave a useful default view. If most readers need the summary rather than every detail row, collapse the appropriate groups before sharing. If readers need to inspect the source data immediately, leave them expanded. Either way, explain the outline in a nearby heading or note if the purpose is not obvious.
  • Do not use grouping as a substitute for organizing source data. Keep related records together and use descriptive column headings. An outline is easiest to maintain when each group corresponds to a genuine, contiguous section of the worksheet.
  • Consider the reader’s screen. Outline controls sit beside the row numbers, while collapsed rows reduce the visible row count. If someone says a section is missing, ask them to check for a plus control before assuming the data was removed.

Troubleshooting

The Group command is missing or unavailable. First, confirm that you selected the numbered row headers and that the workbook is open with editing permission rather than in a read-only view. Expand the Data tab or ribbon if it is minimized. If the selected rows are inside an Excel table, outlining may not be available for that table range. If appropriate for your workbook, convert the table to a normal range using the table tools, or move the data to a normal worksheet range; consider the effect on table features such as structured references and automatic formatting before converting. If the workbook is protected or your access is restricted, ask its owner to allow the needed changes.

The rows disappear, but there is no obvious plus control. Look in the narrow margin immediately left of the row numbers, where the outline bracket and controls appear. Make sure the worksheet is not zoomed or positioned so that the margin is difficult to see. If you selected the wrong range, expand any visible group and repeat the selection using the row headers. You can also select the affected rows and use Data > Ungroup to remove an unintended outline, then create the correct group.

Clicking the control hides the wrong rows. Expand the group again, inspect the bracket that spans the selection, and compare its boundaries with the row numbers you wanted. If multiple groups are present, a plus or minus may belong to a nested group rather than the outer section. Ungroup only the incorrect level, select the intended contiguous rows, and group them again. Take care not to ungroup unrelated sections elsewhere in the worksheet.

Some rows appear to be missing even after expanding. Grouping can hide rows, but other actions can hide them too. Check for filters, manually hidden rows, or a filtered table, and clear or adjust those separately if appropriate. Also check whether the outline has more than one level: expanding an inner group does not necessarily expand its parent. Use the outline’s level buttons, if displayed, to show a broader level of detail, then inspect the row numbers.

The workbook does not keep the view you expected. Wait for Excel for the web to finish saving, then refresh only after the save status confirms your changes are stored. If another editor changes the outline or worksheet at the same time, coordinate with them and check the group again. For a workbook with complicated outlines or commands that are unavailable in the browser, open a copy in desktop Excel for Microsoft 365, make the change there, and confirm that the updated workbook is saved back to its shared location.

Frequently Asked Questions

Can I group rows in Excel Online?
Yes. In Excel for the web, select the row headers and use Data > Group to create an outline when the selected range supports grouping. Use the plus and minus controls to expand and collapse it.

Does grouping rows delete or change their values?
No. Grouping changes which rows are visible, not their cell contents. Expand the group to show the rows again. It is not a way to protect confidential data, because people with workbook access may reveal the hidden details.

Can I group nonadjacent rows together?
A group is a continuous block of rows. For separated sections, create separate groups for each block rather than selecting unrelated rows as one group. This keeps the outline predictable and lets readers collapse each section independently.

How do I expand all the grouped rows?
Click the plus control for each collapsed group. If outline level buttons appear beside the row numbers, choose a level that displays more detail; the exact level depends on how many outline levels the worksheet contains. If some rows remain hidden, check for nested groups or filters as well.

How do I ungroup rows without deleting them?
Select the grouped row headers, choose Data > Ungroup, and choose Rows if prompted. This removes the outline for that selection. The rows and their values remain in the worksheet; use the plus control instead if you want to keep the outline and simply show the details.

Can I group rows that are inside an Excel table?
Excel tables may not allow worksheet outlining for their rows. If Group is disabled, check whether the selection is part of a table. If converting it to a normal range is suitable, use the table tools and review any features or references that depend on the table before making that change.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.