Grouping rows lets you collapse and expand sections of your spreadsheet
Grouping rows in Google Sheets hides or shows multiple rows at once by collapsing them under a single control. When you group rows, a small minus sign appears in the left margin — click it to hide those rows, and a plus sign appears to expand them again. This is useful when your spreadsheet has sections of data you want to focus on separately, like monthly breakdowns within a yearly report, or line items grouped by category.
Google Sheets groups rows based on your selection, not on any hidden pattern in the data. You choose which rows to group, and the grouping stays in place until you remove it. You can create multiple levels of grouping — for example, grouping individual months, then grouping those month-groups into quarters.
Key Takeaways
- Select the rows you want to group by clicking the row number on the left, then holding Shift and clicking the last row number in your range.
- Open the Data menu, choose Group rows, and pick the number of rows to group — Google Sheets will create one group for every N rows you specify.
- A minus sign appears in the left margin next to your grouped rows; click it to collapse, and a plus sign appears to expand them again.
- You can create nested groups by grouping rows within already-grouped sections, which adds additional expand/collapse controls at different levels.
- Remove grouping by selecting the grouped rows again, opening Data, and choosing Ungroup rows.
Select the rows you want to group
Click on the row number of the first row you want to include in the group. The entire row highlights in blue. Then hold Shift and click the row number of the last row you want to include. All rows between the first and last are now selected.
If your rows are not consecutive — for example, you want to group rows 3, 4, 5 and also rows 10, 11, 12 — you cannot do this in a single group. Google Sheets groups only consecutive rows. You would need to create two separate groups instead.
Open the Data menu and choose Group rows
With your rows selected, click the Data menu at the top of the spreadsheet. A dropdown list appears. Click Group rows.
A dialog box opens asking "Group rows" with a text field that says "Group every N rows". This field is where you tell Google Sheets how many rows to bundle into each group. If you selected 12 rows and type 3, Google Sheets creates four separate groups of three rows each. If you type 12, it creates one group containing all 12 rows.
Decide how many rows per group
The "Group every N rows" field controls how Google Sheets divides your selection. If you selected rows 2 through 13 (12 rows total) and you type 4, Google Sheets creates three groups: rows 2–5, rows 6–9, and rows 10–13. Each group gets its own collapse control.
If you want all your selected rows in a single group, type the total number of rows you selected. If you selected 12 rows, type 12. If you want one group per row (which is rarely useful), type 1.
Click OK. Google Sheets applies the grouping immediately. A vertical line appears in the left margin next to your grouped rows, and a minus sign (−) appears at the bottom of each group.
Collapse and expand groups using the controls
Click the minus sign next to a group to hide those rows. The minus sign becomes a plus sign (+), and the rows disappear from view. The row numbers jump from the row before the group to the row after the group. Click the plus sign to expand the group and show the rows again.
If you created multiple groups, each has its own control. You can collapse some groups and expand others independently. This lets you focus on one section of your data while hiding the rest.
Create nested groups for multiple levels
You can group rows that are already part of a group, creating nested levels. For example, if you have 12 rows grouped into four groups of three, you could then select all 12 rows again and group them into one larger group. Google Sheets adds a second set of controls to the left margin — now you can collapse at the three-row level or at the twelve-row level.
Nested groups are useful for hierarchical data. A budget spreadsheet might have individual expense rows grouped by department, then all departments grouped by quarter. Collapsing at the quarter level hides all departments; collapsing at the department level hides only that department's expenses.
Google Sheets shows numbered buttons (1, 2, 3, etc.) in the top-left corner when you have nested groups. Click button 1 to collapse everything to the highest level, button 2 to show one level deeper, and so on. This is faster than clicking individual plus and minus signs.
Remove grouping when you no longer need it
Select the grouped rows again by clicking the first row number, holding Shift, and clicking the last row number. Open the Data menu and click Ungroup rows. The grouping disappears, the rows remain visible, and the collapse controls vanish.
If you have nested groups and ungroup once, Google Sheets removes only the outermost level of grouping. The inner groups remain. Ungroup again to remove the next level, or select all rows and ungroup to remove all grouping at once.
Frequently Asked Questions
Can I group non-consecutive rows?
No. Google Sheets groups only rows that are next to each other. If you need to group rows 2, 3, 4 and also rows 10, 11, 12, you must create two separate groups. Select and group rows 2–4, then select and group rows 10–12 as a second operation.
What happens to my data when I group rows?
Grouping does not change your data. It only hides or shows rows. When you collapse a group, the rows are hidden from view, but they still exist in the spreadsheet. Any formulas that reference those rows continue to work whether the rows are collapsed or expanded.
Can I group columns instead of rows?
Yes. The process is identical. Select column letters instead of row numbers, open the Data menu, and choose Group columns. The collapse controls appear at the top of the spreadsheet instead of the left side.
How many levels of nesting can I create?
Google Sheets supports up to eight levels of nested grouping. In practice, more than three or four levels becomes hard to navigate. If you find yourself nesting deeply, consider whether a different spreadsheet layout would be clearer.
If I share my spreadsheet, will the grouping stay in place for other people?
Yes. Grouping is part of the spreadsheet structure. When you share the file, other people see the same groups and collapse controls. They can expand and collapse groups, but they cannot remove grouping unless you give them editor access.