How to Group Rows and Columns in Google Sheets
In this article, you will learn how to group and ungroup rows and columns in Google Sheets.
What is grouping rows and columns in Google Sheets?
Grouping rows and columns in Google Sheets is a feature that allows you to collapse or expand a set of rows or columns, making it easier to view and analyze specific sections of data.
Why do you need to group rows and columns in Google Sheets?
Grouping rows and columns in Google Sheets can be beneficial because it brings better organization and improved readability to your Google Sheets. Grouping rows and columns can help you organize your data into more manageable sections, making it easier to navigate through a large spreadsheet. By collapsing groups of rows or columns, you can focus on specific sections of data and reduce clutter in your view, which can make your spreadsheet easier to read and understand. For example, if your dataset is vertically or horizontally long, collapsing some columns and rows helps you show key items.
How to group columns and rows in Google Sheets
Without a keyboard and shortcut keys (You can also learn how to group or ungroup rows and columns with shortcuts in this article)
- Select the columns you want to group.
- Right-click and choose “View more column actions”. Then - “Group column A-Z”.
- Now, you can collapse or open the grouped columns by clicking the “+” icon (for opening) or the “-” icon (for collapsing) near the column letters of the selected range.
The following screenshot shows how to group Column B to D.
The same approach applies to grouping rows.
Do you want to know how to ungroup rows and columns?
Here is a way to do it.
- Right-click the bar above the columns or next to the rows and choose “Remove group”.
- If you want to ungroup rows or columns partially, select the number(s) or letter(s) of those row(s) or column(s), right-click, go to “View more column actions", and choose “Ungroup row/column”.
The picture below shows the pop-up menu and “Remove group” command to delete a group of Columns B to D.
In the following screenshot, we are trying to take Column C out from a group of Column B through D.
With a keyboard and shortcut keys
- First, go to the “Help” tab above the toolbar, click “Keyboard shortcuts”, and enable compatible spreadsheet shortcuts.
- To select a row (or a column), you need to press the Shift key (Ctrl for a column) and then hit the Space key while pushing the Shift key (or Ctrl key for a column).
- Then, press Up Arrow or Down Arrow (Left or Right Arrow for columns) to adjust the range selection.
- For Windows, press Shift, Alt, and Right Arrow to group the selected rows or columns. For Mac, press “Option” instead of “Alt”.
- For Windows, press Shift, Alt, and Left Arrow to remove the selected group. Mac users, press “Option” instead of “Alt” again.
- If you want to ungroup the selected ranges (e.g., removing a mid-row from a group of three rows), choose one of the rows or columns that you want to take out (Shift and Space for a row, Ctrl + Space for a column).
- Adjust the range to ungroup with Arrow buttons, and press Shift, Alt (for Windows) or Option (for Mac), and Left Arrow.
At first, you may feel memorizing shortcuts is painful and may be unwilling to do it. However, once you get used to them, they allow you to work much more efficiently. We highly encourage you to learn shortcuts, especially for the particular actions you often do on Google Sheets.
How do you split data into a group in Google Sheets?
You can use “Pivot Table” to split data into a group. Check out the following article explaining Pivot Table in greater detail: Pivot Table in Google Sheets: Explained