Google Sheets Group: How to Group Rows and Columns

Learn practical steps to group rows and columns in Google Sheets, organize data efficiently, and preserve formulas while outlining with the built-in Group feature.

How To Sheets
How To Sheets Team
·5 min read
Quick AnswerSteps

By following these steps, you will learn how to group rows and columns in Google Sheets, collapse or expand data, and ungroup when needed. You'll need a Google account, access to a Sheets document, and a prepared data range. This quick guide covers practical, step-by-step actions to help you group, collapse, expand, and ungroup data across rows and columns, without affecting essential formulas. Follow the steps to improve readability in large datasets.

What grouping does in Google Sheets

Grouping rows or columns creates a lightweight outline that helps you hide and reveal sections of your data. When you group, Google Sheets preserves the underlying data, and only the visibility of the grouped ranges changes. This is particularly useful for dashboards, quarterly reports, and long lists where you want to present a clean view to stakeholders without deleting data. A typical google sheets group workflow begins with a dataset that has logical sections, such as months, departments, or product lines, and ends with an expandable/collapsible summary that keeps core numbers in view. Use grouping to reduce horizontal scrolling and to keep headers aligned with their data. Note that grouping does not alter formulas or references; it simply controls visibility. After you group, you’ll see a minus icon to collapse and a plus icon to expand. This visual cue makes it easier to navigate large sheets without losing context.

How to group rows and columns in Sheets

To group data in Google Sheets, start by selecting the range you want to group. Decide whether you want to group rows or columns. Then open the Data menu and choose Group rows - or Group columns, depending on your selection. The grouped range will show a disclosure triangle (or minus/plus icons) in the margin, which you can click to collapse or expand the group. If you need to adjust the grouping later, you can ungroup the same range via Data > Ungroup. Remember, grouping affects only visibility, not the actual values in cells. This makes it ideal for creating clean, navigable reports while keeping raw data intact.

Practical examples: organizing data with groups

Imagine a multi-year sales dataset with monthly figures across several regions. You can group rows by year to create a compact yearly view, then group columns by region to collapse all regional data into a single summary column. This setup lets you quickly see totals and trends without scrolling through dozens of rows and columns. Groups can be nested for deeper structure (e.g., Year > Quarter > Month). Always ensure headers stay visible by freezing the header row to maintain context while you collapse sections.

Limits and caveats of grouping

Grouping is powerful, but it has caveats. Collapsed sections are hidden for readability, not deleted; be aware that sorting or filtering can interact with grouped ranges in unexpected ways if you are not careful. When you regroup, ensure that calculated fields like totals still reference the correct ranges. If you rely on complex formulas, run a quick check after grouping to confirm results. Grouping also does not replace the need for good data validation; keep a clean source table and separate the output area from the grouped sections.

Alternatives to grouping: filters, pivot tables, and outlines

If you need robust data analysis, consider alternatives in addition to grouping. Filters can temporarily hide rows based on criteria without altering structure. Pivot tables summarize large datasets and provide dynamic aggregations suitable for dashboards. Google Sheets also offers outline features and filters views to manage visibility without changing the underlying data. For recurring reports, combine filters and pivot tables to create flexible, shareable summaries that stay accurate as data updates.

Formatting grouped data for readability

Make grouped data easy to scan by applying consistent formatting. Freeze the top header row so context stays visible, use bold fonts for group headers, and apply light borders to demarcate sections. Conditional formatting can highlight totals or key metrics within a grouped region. When you have multiple levels of grouping, consider alternating row colors for each level to help users distinguish between groups at a glance. Maintain a clean, uncluttered layout to prevent information overload when many groups are collapsed or expanded.

Automating grouping with scripts

For large worksheets or repeated workflows, you can automate grouping with Google Apps Script. The Range.group() method lets you programmatically apply groupings to a chosen range, enabling consistent structure across multiple sheets or documents. Automating grouping saves time and reduces human error, especially when you work with standardized templates or monthly reports. Always test scripts on a copy of your data before applying them to production files to prevent unintended changes.

Best practices for data integrity when grouping

Follow these practices to keep data reliable while using groups. Keep a separate, unmodified source table that feeds grouped views. Freeze headers and keep a consistent column order to avoid misinterpretation when groups are collapsed. Document your grouping structure within the sheet using a small legend or a dedicated “Guide” tab. If you rely on grouped sections for totals, use functions that explicitly reference visible data, such as SUBTOTAL, to minimize confusion when rows are hidden or expanded.

Getting started: a quick checklist

  • Prepare a clean dataset with a clear hierarchy (years, regions, categories).
  • Decide whether to group rows or columns and select the appropriate range.
  • Use Data > Group to apply the grouping; verify the collapse/expand controls appear.
  • Freeze headers and validate formulas after grouping.
  • Consider pivot tables for summary needs and keep a backup copy of the original data.

Tools & Materials

  • Google account with Sheets access(Ensure you are signed in and have permission to edit the target spreadsheet)
  • A dataset to group(Prepare a range with clear headers and logical sections (e.g., years, regions))
  • Computer or tablet with internet(A stable connection helps prevent data loss while grouping)

Steps

Estimated time: 15-25 minutes

  1. 1

    Prepare your data

    Identify the range you want to group. Ensure headers are in a single row and the data below is consistently structured, with no mixed data types in the grouped area.

    Tip: Keep header rows separate from grouped data to avoid accidental grouping of headers.
  2. 2

    Select the range to group

    Click and drag to highlight the rows or columns you want to collapse. Include only the data you intend to summarize.

    Tip: If grouping rows, start from the first data row after the header; if grouping columns, start with the first data column.
  3. 3

    Apply the grouping

    Go to the Data menu and choose Group rows or Group columns depending on your selection. The grouped range will show collapse controls in the margin.

    Tip: Grouping does not delete data; it only hides or reveals it.
  4. 4

    Collapse or expand the group

    Use the minus icon to collapse or the plus icon to expand the group. Nested groups can be opened or closed independently.

    Tip: Collapse groups during reviews to reduce on-screen clutter.
  5. 5

    Ungroup when needed

    If you need to revert, select the grouped range and choose Data > Ungroup. This removes the outline but keeps the data intact.

    Tip: Ungroup before major sorting to avoid unexpected shifts.
  6. 6

    Verify formulas and visuals

    Check any formulas referencing the grouped range and ensure charts or pivots reflect the current view.

    Tip: Use a small test dataset to confirm results before applying to production files.
Pro Tip: Group data in a logical hierarchy (e.g., Year > Quarter > Month) to maximize navigability.
Warning: Avoid grouping data that changes frequently; frequent regrouping can cause confusion.
Note: Use filters and pivots in parallel to maintain flexible analysis without over-relying on grouping.
Pro Tip: If you rely on totals, place them outside grouped sections to prevent accidental exclusion.

FAQ

How do I group rows in Google Sheets?

Select the rows you want to group, open the Data menu, and choose Group rows. A collapse control appears in the margin to hide or show the grouped rows.

Select rows, go to Data, choose Group rows, and use the collapse control to hide or show them.

How do I group columns in Google Sheets?

Select the columns you want to group, go to Data, and choose Group columns. Use the collapse button to toggle visibility of the grouped columns.

Select the columns, choose Group columns from Data, then collapse or expand as needed.

Will grouping affect formulas?

Grouping changes only visibility; formulas reference the underlying data and should stay intact. If you rely on totals, verify with subtotal-based calculations.

Grouping hides data visually but doesn’t change the formulas themselves.

How do I ungroup data?

Select the grouped range and choose Data > Ungroup to remove the grouping while keeping all data intact.

Select the grouped area and Ungroup from the Data menu to undo grouping.

Can grouping be used with filters?

Yes. Filtering can work alongside grouping, but consider how filters may interact with the collapsed sections when sharing the sheet.

You can combine grouping with filters; just be mindful of how filters affect the view.

Is grouping available on mobile?

Grouping is supported in the Google Sheets mobile apps, but the experience may differ slightly from the desktop version; use the Data menu to access the Group option.

Grouping works on Sheets mobile, though the steps may vary by device.

Watch Video

The Essentials

  • Group rows/columns to simplify large sheets
  • Use Data > Group for collapsible sections
  • Ungroup before major re-sorts to avoid misalignment
  • Pivot tables are strong alternatives for summaries
  • Test changes on a copy to prevent data loss
Process overview for grouping data in Google Sheets
Steps to group rows and columns in Google Sheets

Related Articles