How to Group and Ungroup Columns or Rows in Excel

It’s difficult to read and understand worksheets that contain a lot of extensive information. Fortunately, Microsoft Excel offers grouping data a breeze by allowing you to collapse and expand columns with comparable material to produce more compact and clear layouts. In this article, we will show you how to group and ungroup columns in excel. Thus you can organize data easily in groups and it will allow you to show and hide different sections of your worksheet.


How to Group Columns in Excel: with Easy Steps

Consider the following scenario: you have data in existing cells that contain names from different countries. They have different room numbers to be allocated according to their payment history. Now, you have to group them into columns to organize a comparable layout.

Group Columns in Excel


Step 1: Selection of the Columns to be Grouped

Here, We will use the Group Command from selecting the Data tab on the Ribbon to group columns in Excel.

  • Select the columns you want to group. Here, in this example, we will select columns C and D.

Group Columns in Excel

Read More: How to Group Cells with Same Value in Excel


Step 2: Choosing the Group Command

  • Select the Data tab from the Ribbon

Group Columns in Excel

Step 3: Selecting the Column Option to Group Columns

  • Click the Group

Group Columns in Excel

  • Select Columns Command and press Enter.

Group Columns in Excel

  • Selected columns will be grouped. Here, columns C and D are grouped together. You can see the horizontal line marked with a red box.

Group Columns in Excel

Read More: How to Group Duplicates in Excel


How to Ungroup Columns from Grouped Columns

In this section, we will discuss how you can ungroup your columns after you group them in Excel. Let’s learn this!

Steps:

  • Select the grouped columns.
  • Click the Ungroup

Steps


How to Hide and Show Grouped Columns in Excel

If you want to organize data in a smart layout, you may need to hide any group or want to get back the hidden columns. It is basically a very easy process consisting of the following 2 steps.

Steps:

  • Click the Hide Detail icon.

Process

  • Click the Show Detail button to show the group.

Group Columns in Excel


How to Group Rows in Excel

For Example, we want to group rows in Excel for the persons who are from the USA. To do this, we will follow a similar operation to group columns in Excel.

Step 1:

  • Select the rows with the country name, USA.

Row selection Step 2:

  • Select Rows from the Group Command on the Data

Select rows

Therefore, You will see the grouped rows indicating a vertical line on the left.

Steps


✍ Things to Remember

⏩ In your Excel worksheet, you won’t be able to add Calculated Items to grouped Fields.

⏩ It’s impractical to select a few columns that aren’t in near range.


Download Practice Workbook

Download this practice workbook to exercise while you are reading this article.


Conclusion

Thank you for reading this article. Using these methods, you can easily add characters to cells or specific positions as you want. If you have any questions – Feel free to ask us. We, The Exceldemy Team, are always responsive to your queries.


Related Articles

<< Go Back to Group Cells in Excel | Outline in Excel | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Bhubon Costa
Bhubon Costa

Bhubon Costa, B.Sc. in Naval Architecture & Marine Engineering from Bangladesh University of Engineering & Technology, has worked with the ExcelDemy since 2021. Currently, he has been working as a reviewer. Notably, he has written over 90 articles and led several VBA content development teams. He has a great passion for the fields of data analytics and data science. His areas of expertise include Excel VBA, Power Query, Pivot Table, Power BI, MySQL, PostgreSQL, machine learning, and Python... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo