How to Group and Hide Columns in Excel (3 Easy Methods)

One of the core uses of Excel is to insert data to analyze or visualize. For a large amount of data, there can be a lot of columns and rows. Sometimes we may need two or more distant columns to do our work. But we can not get them together as there are multiple columns in between. So one solution is we can hide those columns in between for the time being and unhide them later. In this article, we will learn how to group and hide columns in Excel according to our needs.


Download Practice Workbook

You can download the practice workbook from here.


3 Easy Methods to Group and Hide Columns in Excel

When there is a large amount of data having too many columns, in most cases, adjacent or neighboring columns are there for the same purpose or to calculate the final result. So we may need to categorize them in a certain way or group them. One good feature of grouping columns is we can hide them when we need to. There are actually three ways to Group and Hide columns in Excel. All the methods are described below with proper steps. For Example, we will use the following dataset to demonstrate.


1. Using Excel Ribbon

We can use Excel Ribbon to group and hide columns in Excel. We will need to follow the steps for that.

Steps:

  • First, we need to group the columns. For example, we want to hide the Product ID and Sold Amount. So we will group them first. So we will select the cell range from D4 to E9.

  • Second, we will go to the Data tab in the Ribbon and select Group in the Outline section.

Easy Methods to Group and Hide Columns in Excel

  • Third, a small selection window will appear. We will select Columns and click on OK.

Easy Methods to Group and Hide Columns in Excel

  • Then we will see a small “-” mark has appeared on top of the sheet. This indicates our grouping is done.

Easy Methods to Group and Hide Columns in Excel

  • In the end, clicking on the “-” sign will hide the columns like in the image below. Here the “+” sign indicates the grouped columns are hidden there and we can expand.

Easy Methods to Group and Hide Columns in Excel

Read More: How to Hide Columns in Excel with Minus or Plus Sign (2 Quick Ways)


2. Use of Keyboard Shortcuts

We can also use keyboard shortcuts to directly group the columns. We will follow the steps below.

Steps:

  • Firstly, we will select our columns. In our case, we will select columns D and E.

  • Secondly, we will press Shift+Alt+Right Arrow.
  • Thirdly, we will get the small Group We will select Columns and press OK.

Easy Methods to Group and Hide Columns in Excel

  • Lastly, we will get the columns grouped. We will click on the small dash (-) button to hide it.

Easy Methods to Group and Hide Columns in Excel

Read More: How to Hide Selected Columns in Excel (5 Easy Methods)


Similar Readings


3. Applying VBA to Group and Hide Columns

If we are doing a large operation in excel using VBA, and we need to group and hide our columns for any reason, we can do it through this method. The steps are below.

Steps:

  • At first, we need to decide which columns to group and hide. Like the previous example, we will group and hide columns E and F. We will go to the Developer tab in the Ribbon and choose Visual Basic. A window will appear. Or we can directly trigger it by pressing Alt+F11.

  • Next select Insert and then Module in that window. A small writing window will appear.

Easy Methods to Group and Hide Columns in Excel

  • Then in that window, we will write the following code:
Sub G_H()
Columns("E:F").Group
End Sub

Easy Methods to Group and Hide Columns in Excel

Here you can give the respective field sequence you need instead of E and F.

  • Now we will press Ctrl+S to save the file as Excel Macro-Enabled Workbook or as a .xlsm file.

  • After that, we will again go to the Developer tab and select Macros. A window named Macro will appear.

  • In the window select G_H and select Run.

Easy Methods to Group and Hide Columns in Excel

  • At last, we will get our column grouped. We will hide it by pressing the “-”.

Easy Methods to Group and Hide Columns in Excel

  • Again pressing the “” sign will give us the following result.

Easy Methods to Group and Hide Columns in Excel

Read More: Excel VBA to Hide Columns Based on Criteria (6 Useful Examples)


Hide Columns in Excel Without Grouping

We can also hide the columns without grouping. Here are the methods.

1. Using Excel Context Menu

In this method, we select a column that we will hide. After selecting the column, right-click to get the Context menu. In the menu, we will select Hide and we will see our column will be hidden.

Hide Columns in Excel Without Grouping

We will identify the hidden column with this sign in between two columns:

Read More: How to Hide and Unhide Columns in Excel (7 Quick Methods)


Similar Readings


2. Use of Keyboard Shortcut

We can also use keyboard shortcuts to hide a column. Simply we will select a column and press Ctrl+O. The column will immediately hide.

Hide Columns in Excel Without Grouping

Here we hide the B, D, and F columns with keyboard shortcuts.

Read More: How to Hide Columns Without Right Click in Excel (3 Ways)


3. Using Excel Ribbon

We can select a column or multiple columns, and go to Format in the Cells section in the Home tab. In format select Hide & Unhide. Here we will select Hide Columns and then we will see our column will hide.

Hide Columns in Excel Without Grouping

After all the steps we will get the following result.

Read More: How to Hide Multiple Columns in Excel (5 Easy Methods)


Things to Remember

  • For all the grouping, we can’t go for multiple selections.
  • We can’t hide multiple columns with Context Menu.
  • The entire demonstration was done in Excel 365. So the interface may vary for different versions.

Conclusion

The article was all about How to Group and Hide Columns in Excel. We also showed the methods if you want to avoid grouping for hiding. If you have any sort of suggestions or you are still having trouble with any of these methods, let us know in the comments. Our team is ready to answer all of your questions. For any Excel-related problems, you can visit our website Exceldemy for all types of Excel-related problem solutions.


Related Articles

Nasir Muhammad Munim

Nasir Muhammad Munim

I am Nasir Muhammad Munim from Dhaka, Bangladesh. I work as an Excel and VBA Content Developer for Exceldemy right now. Electrical and electronic engineering was my major at Islamic University of Technology, where I got my degree. I love creative works and learning new things. And I'm really into online games, especially first-person shooter games.

We will be happy to hear your thoughts

Leave a reply

ExcelDemy
Logo