How to Delete Every Other Column in Excel: 5 Easy Ways

Method 1 – Use Custom Sort Feature to Delete Every Other Column

Steps:

  • Add row 3 over the header row.
  • Input the following formula in cell B3.
=MOD(COLUMN()-1,2)
  • The COLUMN function returns the numeric value of the column number.
  • The MOD function will divide each column index by 2.
  • Get two outputs: 1 & 0.
  • Hit enter, and get the remainder as 1 as it is an odd column index.

Use Custom Sort Feature to Delete Every Other Column

  • Drag the formula cell to the right to autofill all the columns.

  • Change to number values to avoid undesired outcomes using the sort feature.
  • Copy row 3.
  • Right-click on the same row.
  • Click the Paste Values option.

  • Select the entire data range and go to Data > Sort.
  • A dialogue box will pop up.
  • Click Options.

  • Another dialogue box shows up.
  • Mark the Sort left to right option and press OK.

  • Another dialogue box will be on the display.
  • Select Row 3 in the Sort by box, and the Order will be Smallest to Largest.
  • Tap OK.

  • The output row is sorted from 0 to 1.

  • Select 0 columns and right-click on them.
  • Click Delete to remove the columns.

  • Get the desired result.

output of custom sort feature to delete every other column


Method 2 – Manually Select Column in Excel to Eliminate

Steps:

  • Select the header of column C.
  • Hold CTRL + left-click on the desired columns to select two or more columns.

Manually Select Column in Excel to Eliminate

  • Right-click on the selected column.
  • An option box will pop up, and select Delete.

  • The columns are eliminated.

output to manual selection of columns to delete


Method 3 – Delete Every Other Column Through Excel VBA

Steps:

  • Go to the Developer bar and press Visual Basic.

Delete Every Other Column Through Excel VBA

  • Click Insert and create a Module.

  • Write the following VBA code in the module. You can also copy it from below.
Sub DltEvryOthrColumn()
Dim r As Range
Set r = Application.InputBox("Set the Range (Excluding headers)", "Range Selection", Type:=8)
For i = r.Columns.Count To 1 Step -2
If i Mod 2 = 0 Then
r.Columns(i).Delete
End If
Next i
End Sub
  • Hit the Run icon.

  • An input dialogue will be displayed.
  • Select the whole dataset and press OK.

  • Delete the alternate columns.


Method 4 – Apply Find and Replace to Remove Alternate Column

Steps:

  • Select the whole dataset.
  • Press Ctrl+F to open up the Find and Replace dialogue box.

Apply Find & Replace to Remove Alternate Column

  • The dialogue box will pop up.
  • Type Positive in the Find What box and press Find All.

  • See the highlighted matching results, which will pop up under the box.
  • Press Ctrl+A to select them all.

  • Hold Ctrl and press thekey to open the delete dialogue box.
  • Click the Entire column option and tap OK.

  • The desired output will appear.


Method 5 – Delete Every Other Column using Blank Cell in Excel

Steps:

  • Some columns have blank cells. Delete these entire columns.
  • Select the whole dataset in the first place.

Delete Every Other Column using Blank Cell in Excel

  • Press F5 to open up the Go to the dialogue box.
  • The dialogue box appears, and tap Special.

  • Fill in the Blanks option and press OK.

  • All the blank cells are highlighted.
  • Right-click on any of those.

  • Remove the blank cells from the dataset.

delete every other column carrying blank cells


Download Practice Workbook


Related Articles


<< Go Back to Delete Columns | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Yousuf Khan
Yousuf Khan

Yousuf Khan has been working with the ExcelDemy project for over one year. He has written 47+ articles for the ExcelDemy site. He also solved a lot of user problems with ExcelDemy Forum. He has interests in Excel & VBA, Desktop and mobile applications, and projects & templates. He completed his graduation and post-graduation in Information Technology from Jahangirnagar University. Currently, he works as a VBA & Excel Content Developer in ExcelDemy projects, writing unique and informative content... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo