A time comes when you have to hide some unwanted data from the Excel spreadsheet. Hiding multiple columns all at once could be a confusing thing for some users. Though it is not a difficult procedure at all when you use multiple tricks explained below such as keyboard shortcuts, Format Command, Mouse Right-Click, and VBA Macros.
Here in this post, you will simply find out how to hide multiple columns in Excel, so let’s get started:
How to Hide Multiple Columns in Excel with Keyboard Shortcuts?
With the help of keyboard shortcuts, you can easily hide multiple columns in Excel. Let’s assume you have a dataset in which you need to hide marks from columns D and E, which have Physics and Chemistry marks. Below are the steps to follow:
- Choose columns D and E in which both subjects’ marks are added.
- Press CTRL + 0 at once from the keyboard.
- Now, you will notice that columns D and E are hidden.
How to Hide Multiple Columns in Excel with Mouse?
Our second method to hide multiple columns in Excel is by using the mouse Right-click option. In this example, the columns having Physics and Mathematics data will get hidden. For this, follow the steps given below:
- Choose columns D and F.
- Now, put the mouse cursor on the selected columns and right-click on the mouse.
- Choose the Hide option from the window that appears.
- Finally, your selected columns are now hidden.
That’s it!
How to Hide Multiple Columns in Excel with Format Command?
In this method, we will be using the Format Command to hide multiple columns in Excel. The most secure and easiest method to hide columns needs you to follow the steps given below:
- In this example, we will hide columns containing Physics and Chemistry data.
- Choose columns D and E.
- Open the Home tab and click on the Cells option.
- From the Cells menu, choose Format Commands and then click on Hide & Unhide option.
- From this option, select Hide Columns.
- You can now hide columns D and E after clicking on the Hide Columns option.
How to Hide Multiple Columns in Excel with Group Feature?
Using the Group feature to hide multiple columns in Excel is a great way. In this example, suppose you need to hide the columns containing data about Physics, Chemistry, and Identification Numbers. For this, follow the steps given below:
- Choose columns C to E.
- Now, open the Data ribbon menu and choose the Data option.
- From there, click on the Outline option, select the Group menu, and then click on the Group option.
- Select the Columns option from the Group dialog box that appears in front of you.
- Press OK.
- You will notice a minus sign appears on the upper side of the columns. Press this sign.
- In the next step, you will get what you want. The desired outcome will be in front of you.
How to Hide Multiple Columns in Excel with VBA Macros?
VBA Macros are often the last solution to any query in Excel. You can hide multiple columns in Excel with the help of VBA code. People love this method because of its effectiveness. Using a similar dataset, we will continue hiding the columns here.
Let’s follow the simple steps given below:
- Select cells from C4 to E16.
- Open a Module now.
- For this, open the Developer tab and click on the Visual Basic option.
- Once the Visual Basic option is opened, you will see the Microsoft Visual Basic for Applications window will pop up. From this window, click on Hide Multiple Columns and add a module to apply the VBA code.
- For this, open the Insert tab and click on Module.
- Now, put the VBA code in the Module.
Sub Hide_Multiple_Columns_VBA() Columns("C:E").Hidden = True End Sub
- You need to run the above code. For this, click on the Run option and choose Run Sub/UserForm
- Once the code starts running, you will get the desired outcome instantly.
That’s it!
Things to Consider while Hiding Multiple Columns with VBA:
Note that you need to press ALT + F11 key command to open the Microsoft Visual Basic for Applications window in case the Developer Menu does not pop up in the Menu Bar.
Final Thoughts:
Hopefully, all the above mentioned methods are effective for you to hide multiple columns in Excel. You just need to practice each method so that you can understand it in better way.