How to add sub columns in Google Sheets
Google Docs Editors Help Show
Sign in Google Help
Send feedback on... This help content & information General Help Center experience
Google Docs Editors
When you're working on a data set, you occasionally need to split a column into two or more new columns. For example, if you imported a database with employees first and last names in one cell, but need the names separated into two cells, use the SPLIT function in the spreadsheet module that comes with Google Docs. If the cells have been previously merged, you can unmerge them with the unmerge button on the toolbar. Using SPLIT
Using Unmerge
If you’ve been asking yourself “Can Google Sheets group rows?” The answer is yes. The functionality was added in 2018 and works great! Grouping data allows you to group rows/columns (that you can expand and collapse with a single click or a keyboard shortcut). This helps as you can make the data concise by hiding the grouped data and in case more detail is needed, you can quickly ungroup and show the grouped data. Below is an example where I have the data for four quarters, and I have grouped each quarter data. To view the data, I can easily click on the plus icon on the left and it shows me the data for that quarter. Now, let’s see how you can group rows and columns in Google Sheets.
Googe Sheets Group Rows GuideBelow is a dataset where I want to group rows in a way that I only have the quarter-wise data available and the rows that make this data are grouped. Below are the steps for grouping rows in Google Sheets:
That’s it, that’s how Google Sheets Collapses rows! The above steps would instantly group the rows and you will see a gray vertical block appear on the left-most part with a minus sign icon. When you click on this minus sign icon, it will hide all the grouped rows and the icon would change to a plus sign one (indicating that it contains some grouped rows). To group other rows, you need to follow the same steps. Just select the rows that you want to group and follow the steps above. Note that you can only group contiguous rows. If you select non-contiguous rows and right-click, it will not show you the option to group. Keyboard Shortcut to Group Rows in Google Sheets: Alt + Shift + ->There is another (faster) way to group rows in Google Sheets – using a keyboard shortcut. Suppose you have the dataset below where you want to group rows 2-4; Below are the steps to using a keyboard shortcut to do this:
Personally, I find using this keyboard shortcut method a lot faster to group rows and columns in Google Sheets. Group Columns In Google SheetsJust like rows, you can also group columns in Google Sheets. Suppose you have a dataset as shown below and you want to group column B and C, so that you can hide and only show the total sales column. Here’s how to group columns in Google Sheets:
The above steps would instantly group these two columns and show a minus icon at the top of the rows. When you click on this minus icon, it will hide the columns and change into a plus icon. When you want to see these columns, you can click on the plus icon and these columns would become visible. Now you know how to collapse columns in Google Sheets. Creating Multiple Layers of GroupingIn the above examples, we have only grouped based on one layer. For example, when we grouped the rows, we did it for all the quarters. So when you hide all the grouped rows, you will see the dataset as shown below (which shows only the quarters and the year values). But what if now you want to add another layer of grouping where even the quarters are grouped and hidden and only the year value is visible. You can do that by adding another layer of grouping over the existing one. Doing this can save space if you have enlarged rows or columns. Below are the steps to do this:
As soon as you do this, you will notice that you now have two layers of grouping (you can see this visually in the gray stripe in the left-most part). The first (bigger) layer will hide all the rows and show only the year, and the second layer has multiple grouping that you can use to hide all month level data and show only quarterly data. Expanding/Collapsing all Grouped Rows/Columns When you create a lot of grouped rows or columns, it is going to take you a lot of time to expand all or collapse all. While doing it one by one for each group is an option, it’s not the efficient one.
Ungroup Rows and Columns in Google SheetsNow that you can group cells in Google Sheets, removing the Google spreadsheet collapsed rows is super simple. Just right-click on the +/- icon and then click on Remove Group. In case you have a huge dataset and many groups, just select all the grouped rows (by selecting the left-most column numbers) and then click on Ungroup rows option. You can also change the position of the +/- icon that appears after the grouping. Just right-click on any of the +/- icon and you get the option Move +/- button to the bottom (or option Move +/- button to the top in case it’s at the bottom already). You can also follow similar steps to unhide rows in Google Sheets. Ungroup Rows and Columns With a Keyboard ShortcutTo remove grouping columns in Google Sheets with a keyboard shortcut, you use a left arrow instead of a right arrow. So, the whole shortcut would be:
Frequently Asked QuestionsHow Do You Name a Group of Rows in Google Sheets?Click on the group, then navigate to Data > Ranges and assign a name. What Does It Mean to Group a Row in Google Sheets?Grouping rows or columns is attaching them to each other so they can be easily selected all at once next to the row or column header. I hope you found this tutorial about how to group rows in Google Sheets useful. If you liked this Google Sheets group rows guide, you may also like the following Google Sheets tutorials:
|