How to Hide Multiple Columns in Excel: 5 Easy Methods

Method 1 – Using Keyboard Shortcuts to Hide Multiple Columns in Excel

Steps:

  • Select columns D and E that contain marks in Physics and Chemistry.

Perform Keyboard Shortcuts to Hide Multiple Columns in Excel

  • 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.

Use Mouse to Hide Multiple Columns in Excel

  • 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.

Use Mouse to Hide Multiple Columns in Excel


Method 3 – Hiding Multiple Columns with Format Command in Excel

Steps:

  • Select columns D and E.

Apply Format command to Hide Multiple Columns in Excel

  • 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.

Apply Format command to Hide Multiple Columns in Excel


Method 4 – Applying Group Feature to Hide Multiple Columns

Step 1:

  • Select columns C to E.

Use Group Feature to Hide Multiple Columns in Excel

  • 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.

Use Group Feature to Hide Multiple Columns in Excel

  • 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.

Use Group Feature to Hide Multiple Columns in Excel

  • Get your desired output that has been given in the screenshot below.

Use Group Feature to Hide Multiple Columns in Excel


Method 5 – Running Excel VBA Code to Hide Multiple Columns

Step 1:

  • Select cells C4 to E16.

Run Excel VBA Code to Hide Multiple Columns in Excel

  • 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

Run Excel VBA Code to Hide Multiple Columns in Excel

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

Run Excel VBA Code to Hide Multiple Columns in Excel

Step 3:

  • Run the code, and the output will be the following:

Run Excel VBA Code to Hide Multiple Columns in Excel


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


<< Go Back to Hide Columns | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Md. Abdur Rahim Rasel
Md. Abdur Rahim Rasel

MD. ABDUR RAHIM is a marine engineer proficient in Excel and passionate about programming with VBA. He views programming as an efficient means to save time while managing data, handling files, and engaging with the internet. His interests extend to Rhino3D, Maxsurf C++, AutoCAD, Deep Neural Networks, and Machine Learning, reflecting his versatile skill set. He earned a B.Sc in Naval Architecture & Marine Engineering from BUET, and now he has become a content developer, creating technical content... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo