Method 1 – Using Keyboard Shortcuts to Hide Multiple Columns in Excel
Steps:
- Select columns D and E that contain marks in Physics and Chemistry.
- Press Ctrl + 0 simultaneously on your keyboard.
- As a result, you can hide columns D and E, as shown in the screenshot below.
Method 2 – Use of Mouse to Hide Multiple Columns
Steps:
- Select columns D and F.
- Place your cursor upon any selected columns, and press right-click on your mouse.
- A window will appear.
- From the window, select the Hide option.
- You can hide selected columns given in the below screenshot.
Method 3 – Hiding Multiple Columns with Format Command in Excel
Steps:
- Select columns D and E.
- From your Home ribbon, go to,
Home → Cells → Format → Hide & Unhide → Hide Columns
- After clicking on the Hide Columns option, hide multiple columns D and E.
Method 4 – Applying Group Feature to Hide Multiple Columns
Step 1:
- Select columns C to E.
- From your Data ribbon, go to,
Data → Outline → Group → Group
Step 2:
- A Group dialog box will appear in front of you.
- From the Group window, select Columns.
- Press OK.
- The Minus(-) sign will appear on the topmost side of the columns.
- Press on the Minus(-) sign, like in the screenshot below, to hide columns.
- Get your desired output that has been given in the screenshot below.
Method 5 – Running Excel VBA Code to Hide Multiple Columns
Step 1:
- Select cells C4 to E16.
- Open a Module.
- Fom your Developer tab, go to,
Developer → Visual Basic
- After clicking on the Visual Basic ribbon, a window named Microsoft Visual Basic for Applications – Hide Multiple Columns will instantly appear.
- We will insert a module from that window to apply our VBA code.
- Go to,
Insert → Module
Step 2:
- Type the VBA code in the created Module.
Sub Hide_Multiple_Columns_VBA()
Columns("C:E").Hidden = True
End Sub
- Run the code. Go to,
Run → Run Sub/UserForm
Step 3:
- Run the code, and the output will be the following:
Things to Remember
↪ If the Developer Menu does not appear in the Menu Bar, press ALT + F11 keys on your keyboard to open the Microsoft Visual Basic for Applications window.
Download Practice Workbook
Download this practice workbook to exercise while you are reading this article.
Related Articles
- How to Hide Extra Columns in Excel
- How to Unhide Columns in Excel
- How to Unhide Columns in Excel All at Once
- Unhide Columns Is Not Working in Excel
- Unhide Columns in Excel Shortcut Not Working
<< Go Back to Hide Columns | Learn Excel
Get FREE Advanced Excel Exercises with Solutions!