How to delete unused columns in excel
Tutor 5 (273 Reviews)
Excel Tutor
Still stuck with a Excel question
Ask this expertAnswer
To delete unused columns in Excel, select the columns you want removed and then delete them using the Ribbon, a right-click menu, keyboard shortcuts, or a small macro. Follow one of these numbered methods depending on your situation.
How to delete a single column
To delete a single column, select the column header and remove it.
-
Click the column header letter (for example,
D). -
Press
Ctrl+-(minus) on Windows, or press⌘+-(minus) on Mac. -
Or right-click the column header and choose Delete.
-
Or on the Ribbon, go to Home → Delete → Delete Sheet Columns.
How to delete multiple adjacent columns
To delete several adjacent columns at once, select their headers first, then delete.
-
Click the first column header.
-
Hold
Shiftand click the last column header in the range. -
Press
Ctrl+-on Windows, or⌘+-on Mac. -
Or right-click any selected header and choose Delete.
How to delete many nonadjacent columns
To remove nonadjacent columns, select each header, then delete.
-
Click a column header.
-
Hold
Ctrl(Windows) or⌘(Mac) and click on other column headers you want removed. -
Press
Ctrl+-on Windows, or⌘+-on Mac. -
Or right-click and choose Delete.
How to delete all columns to the right of the last used column
To remove every column to the right of the last used column on a sheet, identify the last used column and delete everything after it.
-
Press
Ctrl+End(Windows) or⌃+End(Mac) to jump to the last used cell. -
Note the column letter of that cell (for example,
K). -
Click the column header immediately to the right of that column (for example,
L). -
Press
Ctrl+Shift+Right Arrowto select to the sheet edge. -
Press
Ctrl+-(Windows) or⌘+-(Mac) to delete the selected columns.
How to delete truly empty (blank) columns using Go To Special
To remove columns that contain no values and no formulas, use Go To Special.
-
Select the entire sheet by clicking the triangle at the top-left corner or pressing
Ctrl+Atwice. -
On the Ribbon select Home → Find & Select → Go To Special.
-
Choose Blanks and press OK.
-
Press
Ctrl+-and select the Entire column, then OK.
Note that the selection will include blank cells inside used columns. Confirm the highlighted columns are the ones you want to delete before performing the delete.
Will deleting columns affect formulas that reference them?
Yes. Deleting columns that formulas reference changes those formulas and can produce #REF! errors when a referenced column is removed. Check and update formulas before deleting columns.
How to safely delete columns while preserving workbook integrity
To avoid accidental data loss and broken formulas, follow these practices.
-
Make a backup copy of the workbook before deleting large ranges.
-
Use Find or Trace Dependents to locate formulas that reference columns you plan to delete.
-
Convert important ranges to Tables only when appropriate because Tables automatically adjust references.
-
Clear contents when you want to keep column structure but remove data: select columns and press
Delete(this clears cells but keeps columns).
How to unhide columns before deleting
To delete columns that might be hidden, unhide them first.
-
Select the columns around the hidden area (for example, select
BandEto reveal hiddenC:D). -
Right-click and choose Unhide.
-
Then delete the columns as required.
How to delete unused columns using VBA (fast for large tasks)
To remove all columns to the right of the last used column with VBA, run this small macro.
-
Press
Alt+F11to open the VBA editor (Windows). On Mac use Tools → Macro → Visual Basic Editor. -
Insert a new module and paste this macro.
-
Run the macro on the active sheet.
Sub DeleteColumnsRightOfLastUsed()
Dim ws As Worksheet
Dim lastCol As Long
Set ws = ActiveSheet
lastCol = ws.Cells.Find("*", SearchOrder:=xlByColumns, SearchDirection:=xlPrevious).Column
If lastCol < ws.Columns.Count Then
ws.Range(ws.Columns(lastCol + 1), ws.Columns(ws.Columns.Count)).Delete
End If
End Sub
Are there differences between Windows and Mac?
Yes. Keyboard shortcuts differ. On Windows, use Ctrl for most selection and deletion shortcuts. On Mac, use the ⌘ (Command) key for equivalent actions where shown. Right-click, Ribbon commands, and VBA behave the same across platforms.
Common pitfalls
-
Deleting columns breaks formulas that reference those columns and can produce
#REF!errors. -
Using Clear Contents removes data but keeps the column and any structure dependent on it.
-
Selecting blanks with Go To Special may highlight cells inside used columns, producing unexpected deletions.
-
Deleting system columns to the far right rarely reduces file size because Excel stores workbook structure; consider saving and closing before re-opening, or copying needed sheets to a new workbook.
Best practices
-
Back up the workbook before bulk deletions.
-
Inspect formulas with Formulas → Show Formulas or Trace Dependents.
-
Use VBA only when comfortable or after testing on a copy.
-
Remove entire columns rather than clearing cells when you want to permanently remove columns from the sheet.
Quick cheat sheet
-
Select column header →
Ctrl+-(Windows) or⌘+-(Mac) → Delete. -
Select range of headers →
Shift+ click → Delete. -
Select nonadjacent headers →
Ctrl/⌘+ click → Delete. -
Use Home → Delete → Delete Sheet Columns from the Ribbon for a menu approach.
Follow these steps and checks to delete unused columns without losing important data or breaking formulas.
. Was this Helpful?Get Online Tutoring or Questions answered by Experts.
You can post a question for a tutor or set up a tutoring session
Answers · 1
How to sort by highlighted cells in excel
Answers · 1
How to sort excel by column and keep rows together
Answers · 1
How to sort by time in excel
Answers · 1
How to sort alphabetically in excel by last name
Answers · 1