How to mass delete cells in excel
Tutor 5 (273 Reviews)
Excel Tutor
Still stuck with a Excel question
Ask this expertAnswer
To mass delete cells in Excel, select the cells you want removed and use one of these methods: the Ribbon or right-click menu, keyboard shortcuts, Go To Special (for blanks), AutoFilter, or a short VBA macro for large or complex deletes
Method 1 — Delete selected cells (shift cells up/left, delete entire rows/columns)
-
Select the range of cells to delete.
-
On Windows press
Ctrl+-(minus) to open the Delete dialog, or right-click the selection and choose Delete…. -
Choose one option:
-
Shift cells left — fills the gap by moving cells to the right into the selection.
-
Shift cells up — fills the gap by moving cells below upward.
-
Entire row — removes whole rows that intersect the selection.
-
Entire column — removes whole columns that intersect the selection.
-
-
Click OK.
Mac difference: Use ⌘ + - (Command + minus) to open the Delete dialog, or right-click (Control-click) and pick Delete…. The dialog choices are the same.
Method 2 — Delete blank cells fast (Go To Special)
-
Select the full range or column where blanks appear.
-
Press
F5,then click Special…, or use Home → Find & Select → Go To Special. -
Choose Blanks and click OK. Excel selects every blank cell in the range.
-
Press
Ctrl+-(Windows) or⌘+-(Mac). -
Choose Shift cells up (common) and click OK.
This removes blank cells and collapses the data so no empty rows remain inside the selection.
Method 3 — Delete rows that meet a condition (AutoFilter)
-
Select the header row, then choose Data → Filter.
-
Use the filter dropdown to show only the rows to remove (for example, blank values, specific text, or a number range).
-
Select the filtered rows (click the first visible row, then
Shift+ click the last visible row). -
Right-click a selected row number and choose Delete Row, or press
Ctrl+-(Windows) /⌘+-(Mac) and choose Entire row.
This removes rows cleanly without altering hidden rows.
Method 4 — Delete by search (Find & Replace → Select All → Delete)
-
Press
Ctrl+Fand enter the value or text to remove. -
Click Find All, then press
Ctrl+Ato select all found cells. -
Right-click any selected cell and choose Delete… or press
Ctrl+-. -
Pick a suitable delete option (shift up/left or entire row/column) and click OK.
This works for deleting every cell that contains a specific string or value.
Method 5 — Mass delete using a simple VBA macro (for very large or repeated tasks)
-
Press
Alt+F11(Windows) orOption+F11(Mac) to open the VBA editor. -
Insert a new Module.
-
Paste the macro below and run it when you need a bulk deletion.
Sub Delete_BlankCells_ShiftUp()
Dim rng As Range
On Error Resume Next
Set rng = Application.InputBox("Select range to remove blank cells from:", Type:=8)
On Error GoTo 0
If rng Is Nothing Then Exit Sub
Application.ScreenUpdating = False
Dim c As Range
For Each c In rng.SpecialCells(xlCellTypeBlanks)
c.Delete Shift:=xlUp
Next c
Application.ScreenUpdating = True
End Sub
-
The macro prompts for a range and removes blank cells, shifting cells up.
-
Save the workbook as a macro-enabled file (
.xlsm) if you plan to reuse the macro.
Mac difference: The VBA editor and macro behavior are the same in modern Excel for Mac. Use Option + F11 if Alt + F11 does not work.
Method 6 — Use Power Query for structured mass deletions (recommended for complex transforms)
-
Select the data and choose Data → From Table/Range to load into Power Query.
-
In Power Query, remove rows by filter, remove columns, or remove blank rows using the interface.
-
Click Close & Load to return cleaned data to the worksheet.
Power Query is non-destructive to source data and is repeatable for refreshed data sets.
Practical tips and safety steps
-
Always create a backup copy of the workbook before running large deletions.
-
Use Undo (
Ctrl+Z) immediately after a mistaken delete when possible. -
When deleting entire rows or columns, check for formulas that reference those rows or columns first.
-
Use filters or helper columns to mark rows for deletion before removing them.
-
Keep macros limited to trusted files; store reusable macros in the Personal Macro Workbook if you need them across files.
When should you use which method?
-
Use the Delete dialog (Ctrl/⌘ + -) for quick ad-hoc deletions of contiguous selections.
-
Use Go To Special → Blanks when removing empty cells inside a range.
-
Use Filter to delete rows that meet visible criteria without disturbing other rows.
-
Use Find & Select to target cells with specific content.
-
Use VBA for large, repeated or conditional deletions across many sheets.
-
Use Power Query when the data needs repeatable, auditable transformations.
How to recover data after an accidental mass delete
-
Answer: Yes. Use Undo (
Ctrl+Z) immediately to restore deleted cells. -
If the file was saved after deletion, close without saving and reopen the previous version.
-
Use File → Info → Version History to restore an earlier saved version where available.
-
If macOS Time Machine or cloud versioning (OneDrive, SharePoint) is enabled, restore from those backups.
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