How to Delete Extra Columns in Excel (7 Methods)

While working with Microsoft Excel, sometimes we need to delete extra columns in Excel. Microsoft Excel can easily delete extra columns by using Keyboard shortcuts, Sort command, Find Features, VBA macros, and so on. Today, in this article, we’ll get to learn how we can delete extra columns in Excel effectively with appropriate illustrations.


Download Practice Workbook

Download this practice workbook to exercise while you are reading this article.


7 Suitable Ways to Delete Extra Columns in Excel

Let’s say, we have a dataset where some Student Names and their securing marks in Physics, Chemistry, and Mathematics are given in Column B, Column C, Column D, and Column E respectively. In this article, we’ll delete extra columns using seven suitable ways. Here’s an overview of the dataset of our today’s task.

Delete Extra Columns in Excel


1. Apply the Keyboard Shortcuts to Delete Extra Columns in Excel

From our dataset, in this method, we’ll delete Column C which contains marks of Physics of the students by using Keyboard shortcuts. Let’s follow the instructions.

Step 1:

  • First, select Column C which means cell C4 to cell C13.

Apply the Keyboard Shortcuts to Delete Extra Columns in Excel

  • Now, press Ctrl + Minus sign(-) on your keyboard and a dialog box named Delete pops up.
  • From the dialog box select the Entire column and then click on the OK.

Apply the Keyboard Shortcuts to Delete Extra Columns in Excel

Step 2:

  • After completing the above steps, we are able to delete the extra column which has been given in the screenshot.

Apply the Keyboard Shortcuts to Delete Extra Columns in Excel


2. Use Mouse to Delete Extra Columns in Excel

After deleting columns by using keyboard shortcuts, in this method we’ll delete columns by using Mouse from our dataset. Follow the steps below to learn!

Steps:

  • First of all, select Column D that means cell D4 to cell D13.

Use Mouse to Delete Extra Columns in Excel

  • After that, press Right-Click on your Mouse, and a new window pops up.
  • From that window, click on the Delete.

Use Mouse to Delete Extra Columns in Excel

  • Now, instantly a new dialog box named Delete pops up.
  • From the dialog box select the Entire column and then click on the OK.

Use Mouse to Delete Extra Columns in Excel

  • Finally, we’ll be able to delete Column D. After deleting Column D, our dataset becomes as like the screenshot which is given below.

Mouse


3. Apply the Sort Command to Delete Extra Columns in Excel

Let’s say, we have a dataset where some Student Names and their securing marks in Physics, Chemistry, and Mathematics are given in Column B, Column D, Column F, and Column G respectively. Column C and Column E are extra cells that are needed to delete. By using the Sort Command in Excel, We can easily delete these columns. Let’s follow the instructions below.

Step 1:

  • First, select cell B4 to cell G12.

Apply the Sort Command to Delete Extra Columns in Excel

  • From your Data Tab, go to,

Data → Sort → Options

Apply the Sort Command to Delete Extra Columns in Excel

  • After that, a dialog box named Sort Options pops up. From that dialog box, select Sort left to right and then press OK.

Apply the Sort Command to Delete Extra Columns in Excel

Step 2:

  • Now, from the previous dialog box, Sort by Row 4, Sort on Cell Values and order is A to Z and then press OK.

Sort Command

  • After performing the above steps, we’ll get our dataset like the screenshot.

Apply the Sort Command to Delete Extra Columns in Excel

Step 3:

  • Now, again select Column F and Column G.

Apply the Sort Command to Delete Extra Columns in Excel

  • After that press Right-Click on your mouse and a new window pops up. From that window click on the Delete option.

Apply the Sort Command to Delete Extra Columns in Excel

  • Now, a new window named Delete instantly appears before you. From that window, go to,

Entire column → OK

Apply the Sort Command to Delete Extra Columns in Excel

  • After clicking on OK, you’ll get your desired output.

Apply the Sort Command to Delete Extra Columns in Excel


4. Perform the Delete Option to Remove Extra Columns in Excel

In this method, we need to delete the student’s marks in Chemistry. To perform this, follow the instructions.

Steps:

  • First, select cell D4 to cell D13.

Perform the Delete Option to Remove Extra Columns in Excel

  • After selecting cells that are needed to delete, go to,

Home → Cells → Delete → Delete Cells

Perform the Delete Option to Remove Extra Columns in Excel

  • Then a new Delete window pops up. From that window, select Entire Column and then press the OK box.

Perform the Delete Option to Remove Extra Columns in Excel

  • After completing the above instructions, we’ll be able to delete Chemistry’s marks.

Perform the Delete Option to Remove Extra Columns in Excel


5. Run a VBA Code to Delete Extra Columns in Excel

Here, we’ll learn how to delete extra columns in Excel by using the VBA Macros. A dataset is given below where we are applying VBA Macros to delete Column C and Column E.

VBA Code to delete columns

Follow the steps below to learn!

Steps:

  • Go to,

Developer → Visual Basic → Insert → Module

  • After that, a new Module will pop up. Copy the following code. You can just copy-paste from here and use it in your module.
Sub DeleteEmptyColumns()
'UpdatebyExcelDemy
Dim rng As Range
Dim InputRng As Range
xTitleId = "Delete Extra Columns"
Set InputRng = Application.Selection
Set InputRng = Application.InputBox("Range :", xTitleId, InputRng.Address, Type:=8)
Application.ScreenUpdating = False
For i = InputRng.Columns.Count To 1 Step -1
Set rng = InputRng.Cells(1, i).EntireColumn
If Application.WorksheetFunction.CountA(rng) = 0 Then
rng.Delete
End If
Next
Application.ScreenUpdating = True
End Sub
  • Paste the above script into the window and save it by using the keyboard shortcuts Ctrl + S.

VBA Code

  • Then, close the window and go to, Run → Run Sub/ UserForm or press function key F5 on your keyboard.

VBA Code

  • Now, a new window named Macros pops up. From that window click the Run box.

VBA Code

  • After clicking on Run, again a Delete Extra Columns window will pop up asking to select the array.

VBA Code

  • Now, select the array B5:G13 to delete extra columns. After clicking the Ok box, we’ll be able to delete the extra columns.

VBA Code


6. Insert the Find & Select Command to Delete Extra Columns in Excel

In this method, we’ll delete the columns which contain blank cells. For deleting the blank cells along with their columns, we’ll use Find & Select Command from our Home Tab.

Insert Find & Select Command to Delete Extra Columns in Excel

Let’s follow the steps.

Steps:

  • First, from your Home Tab, go to,

Home → Editing → Find & Select → Go to special

Insert Find & Select Command to Delete Extra Columns in Excel

  • After clicking on Go To Special, a new window named Go To Special pops up. From that window, go to, Blanks → OK

Insert Find & Select Command to Delete Extra Columns in Excel

  • Now, blank cells will be selected which has been given in the below screenshot.

Insert Find & Select Command to Delete Extra Columns in Excel

  • Now, press Right-Click on your Mouse, and a new window pops up.
  • From that window, click on the Delete option.

Insert Find & Select Command to Delete Extra Columns in Excel

  • After clicking the Delete option, instantly a new dialog box named Delete pops up.

Insert Find & Select Command to Delete Extra Columns in Excel

  • From the dialog box select the Entire column and then click on the OK box and you’ll get your desired output.

Insert Find & Select Command to Delete Extra Columns in Excel


7. Apply the Find Feature to Delete Extra Columns in Excel

Sometimes we will need to find some data to delete or use the data in our worksheet. In this method, we’ll learn how to delete extra columns by using Find Feature in Microsoft Excel. From our dataset, we want to delete the column where Dalton is found.

Find feature

Follow the steps below to learn!

Step 1:

  • First of all, From your Home Tab, go to,

Home → Find & Select → Find

  • After that, a Find and Replace dialog box will pop up. From that dialog box, type Dalton in the Find what box and then click Find All.

  • Now, you will find the column which contains Dalton which is given in the screenshot.

Step 2:

  • Then, press Right-Click on your Mouse, and a new window pops up. From that window click on the Delete option.

  • Again, a new Delete dialog box will pop up. From that dialog box, follow the instructions,

Entire Column → OK

  • After completing the above steps, you can delete the columns which contain Dalton.


Things to Remember

👉 To delete extra columns in Excel, you’ll be careful in the Go To Special dialog box. From that box Blacks → OK

👉 While deleting blank columns in Excel by using VBA Macros, carefully select the cells array.


Conclusion

I hope all of the suitable methods mentioned above to delete extra columns will now provoke you to apply them in your Excel spreadsheets with more productivity. You are most welcome to feel free to comment if you have any questions or queries.

Md. Abdur Rahim Rasel

Hi! I'm Md. Abdur Rahim Rasel. Welcome to my Profile. Currently, I am working and doing research on Microsoft Excel and here I will be posting articles related to this. I have completed my graduation in Naval Architecture and Marine Engineering(NAME) from Bangladesh University of Engineering and Technology(BUET). I have a passion for learning new things with my knowledge through perseverance and hard work.

We will be happy to hear your thoughts

Leave a reply

ExcelDemy
Logo