How to Group Rows and Columns in Google Sheets

Google introduced the Group Rows and Columns feature in Google Sheets in early 2018. But why is this feature useful?

Grouping rows and columns is especially valuable when working with large datasets. It allows you to organize data into collapsible sections, making it easier to focus on specific areas while hiding unnecessary details.

Before this feature, users relied on hiding and unhiding rows or columns, which was more time-consuming and less intuitive.

With grouping, you can also create nested groups for multi-level data structures (e.g., Category > Sub-category). This makes it easier to drill down into detailed data or view high-level summaries. Additionally, you can add group-wise totals using advanced Google Sheets features, mimicking grouping and subtotals in Excel.

How to Group Rows in Google Sheets

Steps to Group Rows:

  1. Select the rows you want to group — make sure to select the entire rows, not a specific cell range.
  2. Right-click to open the shortcut menu.
  3. Click View more row actions.
  4. Select Group rows.
  5. A gray bar will appear to the left of the row numbers, with icons (+ for collapsed, - for expanded).

Nested Row Grouping in Google Sheets

For hierarchical structuring, you need to arrange your data properly, typically with a parent-child structure. Here’s an example:

ABCD
1YearRegionQuarterSales
22023
3North
4Q110,500
5Q29,800
6Q314,567
7Q48,789
8East
9Q16,500
10Q26,755
11Q38,709
12Q49,000
132024

Steps to Create Nested Groups:

  1. Select rows 3 to 12 and group them.
    • This groups all the rows under 2023.
  2. Select rows 4 to 7 and group them.
    • This groups the North region data under 2023.
  3. Select rows 9 to 12 and group them.
    • This groups the East region data under 2023.

This creates a nested grouping. Note that the header row (row 2) is not included in the grouping, so it remains visible when the groups are collapsed.

How to Ungroup Rows in Google Sheets

Steps to Ungroup Rows:

  1. Right-click the group indicator (the + or - icon).
  2. Select Ungroup rows.

Currently, Google Sheets does not support ungrouping all groups at once, so you may need to remove each group individually.

How to Group Columns in Google Sheets

You can group columns using similar steps as grouping rows.

Steps to Group Columns:

  1. Select the columns you want to group.
  2. Right-click to open the shortcut menu.
  3. Click View more column actions.
  4. Select Group columns.

Unlike rows, a gray bar will appear above the column headers with group indicators (+ for collapsed, - for expanded).

The same approach applies to ungrouping columns: right-click the group indicator and select Ungroup columns.

Key Benefits of Grouping in Google Sheets

  • Simplifies navigation in large datasets.
  • Keeps your spreadsheet organized and readable.
  • Supports hierarchical (nested) grouping for detailed data structures.
  • Mimics Excel’s grouping and subtotal functionalities. See the Resources section below for more details.

Using these grouping techniques, you can make your spreadsheets more efficient, visually cleaner, and easier to work with!

Resources

The following resources will be helpful if you want to add subtotals to grouped rows:

Prashanth KV
Prashanth KV
Your Trusted Google Sheets and Excel Guide Prashanth KV brings a wealth of experience in Google Sheets and Excel, cultivated through years of work with multinational corporations in Mumbai and Dubai. As a recognized Google Product Expert in Docs Editors, Prashanth shares his expertise through insightful blogging since 2012. Explore his blog for practical tips and guidance on maximizing your spreadsheet skills.

Compare Two Tables for Differences in Excel

To compare two tables with similar data for differences, you can use the XLOOKUP...

Calculate Weighted Average in Pivot Table in Google Sheets

You can calculate a weighted average in a Pivot Table using a custom formula...

Summarize Data and Keep the Last Record in Google Sheets

In Google Sheets, we can summarize data (like sum, average, min, max, count) using...

How to Retrieve the Last Record in Each Group in Excel

As part of data analysis, you may need to retrieve the last record from...

More like this

Calculate Weighted Average in Pivot Table in Google Sheets

You can calculate a weighted average in a Pivot Table using a custom formula...

Summarize Data and Keep the Last Record in Google Sheets

In Google Sheets, we can summarize data (like sum, average, min, max, count) using...

Filter Data with Multi-Select Drop-Downs in Google Sheets

If you've started using multi-select drop-downs in Google Sheets, you may encounter challenges when...

12 COMMENTS

  1. If there are protected cells in the column, those without access to edit protected cells cannot expand/collapse grouped rows, am I missing something?

  2. If I have a chart sitting on top of a portion of my grouped rows, is there any way to have that chart disappear when I close that group of rows?

    • Hi, Kevin,

      You can do that but not like in Excel. Right-click anywhere on the left side of the row numbers and from the shortcut menu that appears choose either of the below options.

      1. Expand all row groups.
      2. Collapse all row groups.
      3. Move +/- button to the bottom.

  3. I’ve given users comment/view access only. Why can’t they un-group rows to view the full sheet? There is a lot of data and it’s easier to navigate using the grouping feature.

  4. Could you tell how to alter the position of (+) sign – below or above the group of rows, or left or right the group of columns? Grateful in advance

    • Hi Olegh Bond,

      Row grouping is simply hiding/unhiding a group of rows as per your choice.

      The only benefit is you can collapse (hide) and expand (unhide) the grouped rows with one click.

      Here is the logic.

      row grouping logic 1

      Here to get the below grouping, you should select the rows 3 and 4 first and group it. Then select the rows 6 and 7 and group it.

      row grouping logic 2

      Hope this helps.

    • You can change if the +/- icon should appear above or below by right clicking the icon and choosing the option to move it. The result is mostly only visual, and the grouping will still behave the same.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.