How to Hide Column in Excel?
There are situations in our day-to-day life where we have requirement of some columns for calculation purpose but we do not want that column to be displayed or printed in the report then MS- Excel allows us to easily hide columns in the worksheet. Once a column is hidden, it will not be shown on the display or printed when we print the worksheet. The column is not deleted. Its width is simply reduced to zero.
We can also unhide column in excel when required. We can also create various custom views by hiding and unhiding the required columns for different user and the views.
Top 4 Methods to Hide Column in Excel
#1 – Hide Column in Excel using Right Click
In the below-displayed worksheet, in Employee Data We need to hide the B and C column as it consists of First and Last Name individually and we have concatenated (merged) the names in the D column and we want only that to be displayed. We have various ways to hide and unhide columns in excel. All are explained below.
- We need to click on B (Column Label) with the mouse (when we move the pointer to the label of the columns that gets converted to the downward arrow) and then while pressing Ctrl+Shift we need to press ‘Right Arrow Key‘ also to select the right side column (C).
- We need to make sure that Home tab is activated on the ribbon.
- In ‘Cells‘ group, in the ‘Format‘ drop down, we will be choosing ‘Hide & Unhide’->Unhide Columns
We could choose another way also after selecting the column, which is
- To right click to open the context menu and then choosing the ‘Hide’.
#2 – Hide Column in Excel using Shortcut Key (CTRL+0)
- After selecting the Column B and C (Ctrl+Spacebar could also be used to select a column), we will use the Shortcut key to hide a column in excel – ‘Ctrl+0 (Zero)’.
#3 – Hide Column in Excel using Column Width
- After selecting the column B and C, right click to open the context menu and then choose ‘Column Width’ and specify the width to be ‘0’.
#4 – Hide Column in Excel using VBA
- On the Developer tab, click on ‘Visual Basic’ to open the window for writing VBA Code
- After double clicking on the ‘Sheet 1’, Click on ‘Insert’ Menu->‘Procedure’->Specify the procedure name and paste the following code: Worksheets(“Sheet1”).Columns(“C”).Hidden = True
- Before clicking on ‘Run’ Menu->Run Sub/User Form, Save the file with .xlsm extension as this is for ‘Macro Enabled Workbook’
After hiding the column B and C, the sheet will look like as below. There is ‘Double Line’ between A and D as column B and C is hidden between them.
This has been a guide to hiding columns in excel. Here we discuss the top 4 methods to hide columns in excel including right click, shortcut (CTRL+0), column width and VBA Code. You can learn more about excel from the following articles –
- How to Freeze or Lock Multiple Columns in Excel?
- Group Columns in Excel
- Formula for adding Text in Excel
- Excel Concatenate Date
- How to Remove Space from text in Excel?
- Shortcut in Excel
- Rows to Columns in Excel
- Compare 2 Columns in Excel
- Hide in Excel
- Unhide Columns in Excel?
- Convert Text to Columns in Excel
- How to Print Comments in Excel
- Create Combo Box in Excel and VBA