You cannot literally collapse a single cell in Excel. What you can do is group whole rows or columns, then use the outline buttons that appear to hide and show them. That is how you build a summary sheet with a row of totals at the top and all the underlying data tucked away below. Select the rows or columns you want to hide, go to Data > Group (in the Outline group of the ribbon), and Excel adds a margin with minus and plus buttons on the left edge or along the top. Click the minus to collapse, the plus to expand. The data is still there — it is only hidden — so formulas, charts and totals that reference it keep working.
Two things worth knowing before you start: the rows must be entirely visible (filtered or already-hidden rows break the grouping), and the sheet must not have sheets grouped with it, which is the most common reason the Group button appears grayed out. Ribbon labels can differ slightly by Excel version, platform and region, so if you do not see "Outline" look for the group/ungroup arrow icons in the Data tab.
What You'll Need
- Excel for Windows, Mac, Excel on the web, or Excel for iPad/iPhone with an active Microsoft account. Grouping is not available in the free Excel mobile apps for Android phones in the same form, so use a desktop or browser version to set it up.
- A worksheet where the rows or columns to hide sit next to each other with no blank divider rows inside the block.
- Headers on your data, so that the summary row at the top is not mistaken for a detail row.
Step-by-Step
- Prepare the data. Remove blank rows and total rows from the middle of the block you plan to collapse. Put any subtotal or note lines either directly above or directly below the detail rows, not scattered inside them. If a filter is active, clear it with Data > Clear before grouping.
- Select the rows to hide. Click the row number of the first detail row, hold Shift, and click the row number of the last one. For columns, click the column letters the same way. Do not include your header row or the summary row — those stay visible.
- Group them. On the Data tab, click Group in the Outline section, or press Alt+Shift+Right Arrow on Windows (Command+Shift+K on some Mac layouts; the menu is the reliable route on Mac). A gray bar with a minus button appears in the margin beside the selected rows, or above the selected columns, and the row numbers change weight or color to show the grouped range.
- Collapse and expand. Click the minus button on the margin to hide the group; it becomes a plus button. Click the plus to bring the rows back. The same buttons sit at the top-left of the sheet as small numbered boxes (1, 2, 3), where the highest number shows everything and the lowest shows the most-collapsed view.
- Add nested levels if you want more than one layer. Select a smaller block of detail rows inside an existing group and press Group again. Excel creates level 3 inside level 2, so you can collapse to summary, then to sub-summary. Keep nesting to three or four levels at most; beyond that the margin buttons become hard to hit accurately.
- Check your grouping direction is correct. Go to Data > Outline (the small dialog launcher at the bottom-right of the Outline group) and confirm the Summary rows below detail box matches where your totals actually sit. If your totals are above the data, tick it. Getting this wrong makes the collapse buttons hide the wrong rows.
- Test the outline before sharing the file. Click every level button to confirm that each view still shows the rows a reader would expect. Type a value into a visible cell and confirm the formulas that point at hidden rows still recalculate; they should, because hidden rows remain part of the calculation.
- Remove grouping when it is no longer needed. Select the grouped rows, then Data > Ungroup, or press Alt+Shift+Left Arrow on Windows. Doing this one level at a time removes only the innermost layer, so repeat it if you nested groups.
Common Mistakes
- Grouping while multiple sheets are selected. If more than one sheet tab is highlighted (white tabs instead of gray), grouping is disabled. Right-click any tab and choose Ungroup Sheets, or click a single tab.
- Trying to group a cell range instead of whole rows or columns. Excel cannot collapse an arbitrary block of cells. Select the complete rows or columns; if you need to hide part of a row, use a row group and keep the shared columns in the summary row.
- Leaving the summary row inside the group. The total then disappears along with the detail, which defeats the point. Move the total outside the selected rows.
- Adding new rows below an existing group and expecting them to join it. Rows inserted at the boundary often appear outside the outline. Select them and group them again, or enlarge the group by selecting the old and new rows together.
- Assuming hidden rows are deleted. They are not. Copying a selection that spans hidden rows will paste them as hidden rows too; use Home > Find & Select > Go To Special > Visible cells only before copying if you only want what is on screen.
Tips
- Press Ctrl+8 on Windows to toggle all outline symbols on and off. Useful for a clean printout or a screenshot, since the margin buttons do not print anyway.
- Freeze the header row with View > Freeze Panes before grouping, so the column labels stay put while you scroll through a long expanded block.
- Group columns as well as rows for a wide sheet, but do it from the right-hand columns inward so the summary columns stay next to the data they describe.
- Use a cell style or bold font on your summary row so anyone opening the file immediately understands which row survives the collapse.
- If you share the workbook, mention that the outline exists. A reader who sees only level 1 may think data is missing.
Troubleshooting
The Group button is grayed out. Almost always multiple sheets are selected, or you have selected a range of cells rather than whole rows or columns, or the workbook is protected. Check the sheet tabs first, then re-select using the row numbers. If the sheet is protected, it will need to be unprotected by whoever set the password.
No outline buttons appear at all. Turn on Data > Outline > dialog launcher and check whether the outline symbols have been switched off, or press Ctrl+8 to toggle them back on.
Collapsing hides the wrong rows. Open the Outline settings dialog and correct the "Summary rows below detail" option. In sheets converted from another program, Excel's automatic outline may also have guessed wrong, so ungroup everything and regroup manually.
The plus/minus buttons overlap and you keep clicking the wrong one. You have nested too deeply. Ungroup the innermost level and instead use a subtotal row or a separate tab for the extra detail.
Grouping disappears after an edit. Inserting or deleting rows in the middle of a group can break the range. Re-select the intended rows and group again. Save a copy before doing large structural edits.
Frequently Asked Questions
Can I collapse a single cell on its own?
No. Excel hides entire rows or columns, never individual cells. The closest option is a cell with text wrapping and a narrow row height that you expand manually, which is cosmetic rather than a real collapse.
Does collapsing rows affect formulas or charts?
No. Hidden rows and columns are still calculated and still plot. Only filtered-out rows are excluded from some aggregate functions; hidden rows are not.
Do the outline buttons print or export to PDF?
They do not print. The collapsed or expanded state you leave the sheet in is what gets printed, so set the level you want first.
Can I password-protect an outline so others cannot expand it?
Not directly. Protecting the sheet restricts structural changes and can prevent grouping and ungrouping, but there is no separate password just for outline buttons. Anyone with the sheet password can change it.
What is the difference between grouping and hiding rows?
Hiding rows via right-click removes them from view with no control to bring them back. Grouping adds the plus/minus controls, so it is the better choice for anything a reader is expected to expand.
Does grouping work in Excel on the web and on iPad?
Grouping and ungrouping is available in Excel for the web and in the iPad app, but the layout of the controls differs from the desktop ribbon, and some outline settings are desktop-only. Set up complex nested outlines on a desktop version.