This is the sample dataset.

Method 1 – Utilizing Keyboard Shortcuts to Hide Extra Columns in Excel
YStep 1:
- Select an entire column after the end of your dataset. Here, F .

Step 2:
- Press Ctrl + Shift + Right Arrow.
It will select all extra columns from column F till the last column in the workbook: XFD.

Step 3:
- Press Ctrl + 0.

Step 4:
These columns are not displayed.

Read More: How to Hide Columns with Button in Excel
Method 2 – Using the Hide Command to Hide Extra Columns
Step 1:
- Click the column header of the column after your dataset.

Step 2:
- Press Ctrl + Shift + Right Arrow to select all extra columns.

Step 3:
- Right-click any of the selected column headers.
- Choose Hide.

Step 4:
All extra columns are hidden.

Read More: Hide Columns with No Data in Excel
Method 3 – Using Format Tools to Hide Extra Columns in Excel
Step 1:
- Click the column header of column F.
- Press Ctrl + Shift + Right Arrow.

Step 2:
- Go to the Home tab.
- In Cells, click Format.

Step 3:
- Go to Visibility.
- Choose Hide & Unhide.
- Select Hide Columns.

Step 4:
You will not see the extra columns.

Read More: How to Hide Multiple Columns in Excel
Method 4 – Applying VBA to Hide Extra Columns
Step 1:
- Enable the developer tab if it is not visible on the ribbon.
- Select the Developer tab.
- Choose Visual Basic in Code.

Step 2:
- In the VBA window, click Insert.
- Choose Module.

Step 3:
- 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:
- Save the code.
- Click the play button or press F5 to run the code.

Step 5:
There will be no extra columns in the worksheet.

Read More: How to Hide Columns Without Right Click in Excel
Download Practice Workbook
Download the free Excel workbook.
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 | Learn Excel
Get FREE Advanced Excel Exercises with Solutions!

