Grouping in Excel: How to Group Rows and Columns

Grouping in Excel

Do you have an Excel worksheet with hundreds of rows or lots of columns?

Maybe you are working with monthly sales, employee details, expenses, or a detailed report. After a while, the worksheet can become difficult to read because there is simply too much information on the screen.

You may want to hide some of the details temporarily, but you don’t want to delete anything.

This is where Grouping in Excel can help.

Grouping lets you put related rows or columns together. You can then collapse the group when you don’t need the details and expand it again whenever you want to see them.

The best part is that your data stays exactly where it is.

In this article, you will learn how to group rows and columns in Excel, how to expand and collapse groups, how to remove grouping, and how to use Excel’s outline levels.

What Is Grouping in Excel?

Grouping in Excel allows you to combine related rows or columns into a group.

Once you create a group, Excel adds small minus (-) and plus (+) buttons next to the grouped rows or above the grouped columns.

You can use these buttons to show or hide the details.

  • Click the minus (-) button to collapse the group.
  • Click the plus (+) button to expand the group again.

For example, imagine you have daily sales data for January.

You may want to see every day’s sales while working on the report. But when you want to look at the monthly total, you may not need all those daily rows on the screen.

You can group the daily rows and collapse them.

The daily details will be hidden, while your summary or total row can remain visible.

The data is not deleted. It is only hidden when the group is collapsed.

Why Use Grouping in Excel?

Grouping is especially useful when your worksheet contains a lot of detailed information.

You can use grouping to:

  • Hide detailed rows temporarily
  • Show only important summary rows
  • Organize monthly data
  • Organize weekly sales reports
  • Keep large reports easier to read
  • Compare totals more easily
  • Make a worksheet less crowded

For example, suppose you have sales data for all 12 months.

Each month may contain several rows of daily sales. Instead of keeping all the daily details visible, you can group the rows for each month.

Then you can collapse the groups and focus on the monthly totals.

Whenever you need to check the details, simply expand the group again.

How to Group Rows in Excel?

Let’s start with one of the most common uses of grouping:

Grouping rows.

Suppose you have a sales report with daily sales details and a total row.

You want to hide the daily details but keep the total visible.

Step 1: Select the Rows

First, select the rows you want to group.

For example, if the daily sales details are in rows 2 through 4, select rows 2 to 4.

You can select the rows by clicking and dragging over their row numbers on the left side of the worksheet.

Tip: Don’t select the heading or total row unless you want that row to be part of the group.

How to Group Rows in Excel

Step 2: Go to the Data Tab

On the Ribbon, click the Data tab.

Step 3: Click Group

Look for the Outline group.

Click Group.

If Excel asks whether you want to group Rows or Columns, select Rows and click OK.

Excel will now create a group for the selected rows.

Step 4: Collapse the Group

You should now see a small minus (-) button next to the grouped rows.

Click the minus (-) button.

Collapse the Group

Excel will collapse the group and hide the detailed rows.

You can now see the rows outside the group, such as your total row.

When you want to see the details again, click the plus (+) button.

expand the Group BY CLICKING + BUTTON

That’s it.

You can expand and collapse the group whenever you need it.

Example of Grouping Rows in Excel:

Let’s say you have a simple sales report containing several rows of daily sales.

You want to group the daily sales rows and keep the total row visible.

Select the daily sales rows and go to:

Data → Group

After creating the group, Excel adds a minus (-) button next to those rows.

Collapse the Group

Click the minus button, and Excel hides the grouped rows.

Now you can see the total without all the individual sales details taking up space.

When you need to check the daily sales again, click the plus (+) button.

expand the Group BY CLICKING + BUTTON

This is one of the main reasons grouping is useful for reports. You don’t have to delete or move the detailed data just to get a cleaner view.

How to Group Columns in Excel?

Grouping is not limited to rows.

You can also group columns.

This is useful when your worksheet contains many columns and you want to temporarily hide some of them.

For example, imagine you have monthly sales information from January through August.

You may want to hide a few months while looking at other information in the report.

You can group those columns.

Step 1: Select the Columns

Select the columns you want to group.

For example, select columns F through I.

You can select them by clicking and dragging across the column letters at the top of the worksheet.

How to Group Columns in Excel

Step 2: Go to the Data Tab

On the Ribbon, click the Data tab.

Step 3: Click Group

In the Outline group, click Group.

If Excel asks what you want to group, select Columns.

Step 4: Collapse or Expand the Columns

Excel will create a group above the selected columns.

You will see a minus (-) button above the grouped columns.

Collapse the Columns

Click the minus button to collapse the group.

The grouped columns will be hidden.

When you want to see them again, click the plus (+) button.

Expand the Columns

How to Group Multiple Sections?

You can create more than one group in the same worksheet.

For example, imagine you have a sales report where each month has its own rows:

Now you can create a separate group for each month’s details.

Group January:

Select the January detail rows, 2 to 13, and click:

Data → Group

Excel creates the first group.

Group February:

Next, select the February detail rows, 9 to 11, and click:

Data → Group

Excel creates the second group.

Group March:

Then, select the March detail rows, 13 to 15, and click:

Data → Group

Excel creates the third group.

How to Group Multiple rows sections

Now you have three separate groups in the same worksheet.

You can collapse or expand each group independently.

For example, you can collapse January and February while keeping March expanded.

This is useful when your worksheet has separate sections for months, weeks, departments, products, or other categories.

Can You Create Groups Inside Other Groups?

Yes. Excel also allows you to create nested groups, where one group is placed inside another group.

Let’s continue with the same sales report.

Suppose each month contains several weeks, and each week contains daily sales:

You can first group the daily rows for each week.

For example:

  • Group the daily rows for Week 1
  • Group the daily rows for Week 2
  • Group the daily rows for Week 3

Then you can create another group that contains the Week 1, Week 2, and Week 3 sections for January.

Create Groups Inside Other Groups

Now you have groups at different levels.

You can collapse the daily details while keeping the weekly information visible.

You can then collapse the whole January section to see only the January summary.

This is called nested grouping because one level of grouping is inside another level.

Why Is This Useful?

Nested grouping is useful when your report has several levels of detail.

For example:

Year → Month → Week → Day

You can move between these levels and choose how much detail you want to see.

Excel also shows outline numbers such as 1, 2, and 3. These let you quickly switch between summary and detailed views.

How to Ungroup Rows or Columns in Excel?

What if you no longer need a group?

You can remove the grouping without deleting any data.

Follow these steps:

  1. Select the grouped rows or columns.
  2. Go to the Data tab.
  3. Click Ungroup.
  4. If Excel asks, choose Rows or Columns.

Excel will remove the grouping buttons.

Your data will remain in the worksheet.

Only the grouping is removed.

How to Remove All Grouping in Excel?

What if your worksheet contains many groups and you want to remove all of them?

You don’t have to remove each group one by one.

You can use Clear Outline.

  1. Click anywhere in the worksheet.
  2. Go to the Data tab.
  3. Click the arrow next to Ungroup.
  4. Select Clear Outline.

Excel will remove all row and column groups from the worksheet.

Your data will not be deleted.

Only the outline grouping is removed.

Using the Outline Numbers in Excel:

When you create groups, Excel may also show numbers such as:

1  2  3

Using the Outline Numbers in Excel

These are called outline levels.

They let you quickly control how much detail you want to see.

For example:

  • 1 shows the highest-level summary.
  • 2 shows more details.
  • 3 shows even more details.

The number of levels depends on how your worksheet is grouped.

For a large report, these buttons can save you a lot of time.

Instead of clicking several plus and minus buttons individually, you can click an outline level to change the amount of detail shown.

Keyboard Shortcuts for Grouping in Excel:

You can also group and ungroup rows or columns using keyboard shortcuts.

  • Alt + Shift + Right Arrow → Group selected rows or columns
  • Alt + Shift + Left Arrow → Ungroup selected rows or columns

For example, select the rows you want to group and press:

Alt + Shift + Right Arrow

Excel will create the group and show the minus (−) button so you can collapse the rows.

To remove the group, select the grouped rows and press:

Alt + Shift + Left Arrow

Tip: These shortcuts are useful when you frequently create or remove groups and don’t want to go to the Data tab each time.

Grouping vs Hiding Rows in Excel:

Grouping and hiding rows may look similar, but they work differently.

GroupingHiding
Lets you collapse and expand data easilySimply hides the rows or columns
Shows plus and minus signsDoes not show expand or collapse buttons
Creates an outline structureDoes not create an outline structure
Good for reports with details and totalsGood when you want rows hidden for a while

If you regularly need to switch between detailed and summary views, grouping is usually more convenient than simply hiding rows.

Grouping Rows vs Filtering:

Grouping and filtering are also different Excel features.

Grouping lets you organize related rows or columns and then expand or collapse them.

Filtering lets you show or hide rows based on specific conditions.

For example:

  • Grouping: Hide all January details.
  • Filtering: Show only sales from January.
  • Grouping: Collapse a detailed section of a report.
  • Filtering: Show only products with sales above ₹50,000.

You can also use grouping and filtering together if your report requires both.

Common Problems With Grouping in Excel:

Grouping is usually straightforward, but you may sometimes run into a problem.

Here are a few common ones.

The Group Button Is Not Working:

First, make sure you have selected the rows or columns you want to group.

If nothing is selected, Excel may not know what you want to group.

In a large worksheet, it is also easy to accidentally select the wrong range, so check your selection before clicking Group.

The Group Option Is Disabled:

If the Group option is unavailable, check whether the worksheet is protected.

Worksheet protection can prevent you from making certain changes to the outline or worksheet structure.

The Plus and Minus Buttons Are Not Visible:

Sometimes the outline symbols may be turned off.

To check this:

  1. Go to File → Options.
  2. Click Advanced.
  3. Look for the option related to showing outline symbols if an outline is applied.
  4. Make sure the option is enabled.
  5. Click OK.

The outline buttons should then appear when a group is applied.

My Rows Are Still Hidden After Ungrouping:

Sometimes you may remove a group while the rows are still collapsed.

In that case, the rows may remain hidden even though the grouping has been removed.

You can unhide them manually.

  1. Select the rows around the hidden rows.
  2. Go to the Home tab.
  3. Click Format.
  4. Select Hide & Unhide.
  5. Click Unhide Rows.

The hidden rows should appear again.

Important Tip Before Grouping:

Before creating groups, try to keep your worksheet organized.

A well-organized worksheet makes grouping much easier.

For example, try to have:

  • Clear headings
  • Similar information in each column
  • Related rows kept together
  • Summary or total rows where needed
  • No unnecessary blank rows

For example, if you are preparing a monthly sales report, keep all January information together, followed by February, March, and so on.

This makes it easier to select the correct rows and create useful groups.

Grouping Worksheets Is Different:

One important point to remember is that grouping rows and columns is not the same as grouping worksheets.

When you group rows or columns, you are organizing information inside the current worksheet.

When you group worksheets, you select multiple worksheet tabs and work with them as a group.

For example, changes made to one selected worksheet can also be applied to the other grouped worksheets.

So, make sure you know what you are grouping before making changes.

This article focuses on grouping rows and columns inside a worksheet.

Frequently Asked Questions:

1. What is grouping in Excel?

Grouping in Excel lets you combine related rows or columns so you can easily hide and show the details.

You can collapse a group when you want a cleaner view and expand it again when you need the details.

2. Does grouping delete data in Excel?

No.

Grouping does not delete your data.

It only hides the grouped rows or columns when you collapse the group.

3. How do I group rows in Excel?

Select the rows you want to group, go to the Data tab, click Group, and choose Rows if Excel asks.

4. How do I group columns in Excel?

Select the columns you want to group, go to the Data tab, click Group, and choose Columns if Excel asks.

5. How do I remove grouping in Excel?

Select the grouped rows or columns, go to Data, click Ungroup, and choose the appropriate option.

6. Can I create more than one group in Excel?

Yes.

You can create multiple groups in the same worksheet.

You can even create groups inside other groups to create different levels of detail.

7. Can I group both rows and columns?

Yes.

You can group rows, columns, or both in the same worksheet.

8. How do I expand a group?

Click the plus (+) button next to the grouped rows or above the grouped columns.

9. How do I collapse a group?

Click the minus (-) button next to the grouped rows or above the grouped columns.

10. Can I group non-adjacent rows?

The normal Group command works with a selected range of adjacent rows or columns.

If the rows or columns are separated, you generally need to create separate groups for each range.

Final Thoughts:

Grouping is a simple but very useful Excel feature, especially when you work with large reports.

Instead of keeping every detail visible all the time, you can group related rows or columns and collapse them when you want a cleaner view.

And whenever you need the details again, just click the plus (+) button.

If you regularly work with sales reports, expense sheets, budgets, or other large Excel files, grouping can make your worksheets much easier to read and navigate.

Try grouping a few rows in your next Excel report. Once you get used to the plus and minus buttons, it becomes a very handy way to manage detailed data.


Discover more from Excellopedia

Subscribe to get the latest posts sent to your email.

Leave a Reply

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