The Excel worksheets are made up of a combination of numerous rows and columns. There are a total of 1,048,576 rows and 16,384 columns in a single Excel worksheet. Generally, you don’t need all those columns or rows while you are working. You can hide all the extra columns in your Excel worksheet for a neat and clean look. In this article, we will show you how to hide extra columns in Excel.
How to Hide Extra Columns in Excel: 4 Easy Ways
To demonstrate our process, we will use the following data set. Here we have some information about some random people. You can see from the following picture that the last data from our data set is in column D. So, we will use four different ways to hide those extra columns, starting from column E. We will utilize a keyboard shortcut in our first method, insert the Hide command in the second one, use the Format tools in the third procedure, and lastly, apply VBA.
1. Utilizing the Keyboard Shortcut to Hide Extra Columns in Excel
You can press some buttons on your keyboard to hide the extra columns you don’t need. For a better understanding, follow the following steps.
Step 1:
- First of all, select an entire column just after the end of your data set.
- For example, we will select column F in our procedure.
Step 2:
- Secondly, after selecting the column, press Ctrl + Shift + Right Arrow on your keyboard.
- Consequently, it will select all the columns starting from column F till the last column of your workbook which is XFD.
Step 3:
- Thirdly, after selecting all the extra columns, press Ctrl + 0 on your keyboard.
Step 4:
- Finally, you will be able to hide all the extra columns with this keyboard shortcut.
Read More: How to Hide Columns with Button in Excel
2. Inserting Hide Command to Hide Extra Columns
In our second method, we will directly use the Hide command rather than the keyboard shortcut. To learn more about the procedure, see the following steps.
Step 1:
- First, click on the column header right after your data set.
Step 2:
- Next, after clicking on the column header, press Ctrl + Shift + Right Arrow to select all of the extra columns.
Step 3:
- After that, right-click on any of the selected column headers.
- Then, choose the Hide command from the context.
Step 4:
- Finally, you will find all your extra columns hidden from your worksheet.
Read More: Hide Columns with No Data in Excel
3. Using Format Tools to Hide Extra Columns in Excel
In our third procedure, you will see the use of the Format tools in the Excel worksheet to hide extra columns. To hide extra columns in this way, follow the steps below.
Step 1:
- First, click on column header F which is the first column after the data set.
- Next press Ctrl + Shift + Right Arrow on your keyboard.
Step 2:
- Then, go to the Home tab of the ribbon.
- After that, in the Cells group click on Format.
Step 3:
- Subsequently, from the Format tool, go to Visibility from the drop-down.
- Then, choose the Hide & Unhide options from there.
- Finally, select the Hide Columns command.
Step 4:
- Finally, you will not see those extra columns anymore on the worksheet.
Read More: How to Hide Multiple Columns in Excel
4. Applying VBA to Hide Extra Columns
In our last approach, we will take the help of a VBA code to solve our problem. See the following steps to understand the procedure.
Step 1:
- First, you will have to enable the developer tab if it is not visible in your ribbon.
- Next, Select the Developer tab.
- Then choose the Visual Basic command from the Code group.
Step 2:
- Next, you will see the VBA window after choosing the previous command.
- Then, from the Insert tab choose Module.
Step 3:
- After that, copy the following VBA code into the module.
' Set the function name
Sub Hide_Extra_Columns()
' Set the range of the unused or extra columns and hide them
Columns("F:XFD").Hidden = True
End Sub
Step 4:
- Now, save the code and press the play button or F5 to run the code.
Step 5:
- Finally, after running the VBA code, there will be no extra columns in the worksheet.
Read More: How to Hide Columns Without Right Click in Excel
Download Practice Workbook
You can download the free Excel workbook here and practice on your own.
Conclusion
That’s the end of this article. I hope you find this article helpful. After reading the above description, you will be able to hide extra columns in Excel. Please share any further queries or recommendations with us in the comments section below. The Exceldemy team is always concerned about your preferences.
Related Articles
- 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
- How to Hide and Unhide Columns in Excel
<< Go Back to Hide Columns | Columns in Excel | Learn Excel
Get FREE Advanced Excel Exercises with Solutions!