How to Delete Rows in Excel: 5 Methods From Shortcut to VBA

Learn how to delete rows in Excel using keyboard shortcuts, right-click, filters, Remove Duplicates and VBA. Includes blank row removal and recovery tips.

How to Delete Rows in Excel: 5 Methods From Shortcut to VBA

Deleting rows in Excel sounds simple until you realize there are at least eight different ways to do it — and choosing the wrong one can break formulas, shift references, or leave hidden blanks scattered across your worksheet. Knowing the right method for the job protects your data and saves you from rebuilding tables from scratch.

This guide walks through every reliable approach, from the ribbon button most beginners use to the keyboard shortcuts power users rely on daily. You will see how to remove single rows, blocks of rows, every other row, blank rows, duplicates, and rows that match conditions in a column. Each method works in Excel 365, 2021, 2019, and 2016.

By the end, you will pick the fastest method for your situation. Need to clear 50,000 blank rows in a sales export? Filter then delete. Need to drop one row mid-sheet? Shift+Spacebar then Ctrl+- works in under two seconds. The right shortcut turns a 20-minute clean-up into a 30-second task.

Excel Row Limits That Matter

1,048,576Max rows per sheet
Ctrl+-Shortcut to delete row
Shift+SpaceSelect full row
100 actionsUndo limit

Method 1: Delete a Single Row Using the Right-Click Menu

The right-click method is the most discoverable approach and works identically across every Windows and Mac version of Excel. Click the row number on the left edge of the sheet — this selects the entire row across all columns. The row number turns dark green, confirming the full selection.

Right-click anywhere on the selected row to open the context menu. Choose Delete from the list. The row vanishes and every row beneath shifts up by one position. Formulas in other cells that referenced that row will update their cell addresses automatically, though formulas that referenced the deleted row directly may now show #REF! errors.

This method works for one row or many rows at once. To select multiple consecutive rows, click the first row number, hold Shift, then click the last row number. For non-consecutive rows, hold Ctrl while clicking each row number you want to remove.

Microsoft Excel - Microsoft Excel certification study resource

Four Fastest Ways to Delete Rows

Right-Click Menu

Click row number, right-click, select Delete. Best for 1-5 rows when accuracy matters more than speed.

Keyboard Shortcut

Shift+Space to select row, then Ctrl+- (Ctrl+minus). Fastest for repetitive deletions while you work.

Home Tab Ribbon

Home > Delete > Delete Sheet Rows. Useful when your hands are already on the mouse near the ribbon.

Filter then Delete

Apply filter, show only target rows, select visible cells, delete. Best for bulk conditional deletes.

Method 2: The Keyboard Shortcut Power Users Swear By

If you delete rows more than five times a day, learn this shortcut and never reach for the mouse again. Click any cell in the row you want to remove. Press Shift+Spacebar — this extends the selection to cover the entire row. You will see all 16,384 columns highlight at once.

Now press Ctrl+- (Ctrl and the minus sign). The row disappears instantly. On a Mac, the same shortcut is Cmd+- after Shift+Space. There is no confirmation dialog, no animation, and no waiting. This is why accountants and data analysts who live in Excel finish row clean-up so much faster than casual users.

You can chain this shortcut to delete many rows quickly. After deletion, the cell pointer stays at the same row number — which is now the row that used to be below. Press Shift+Space and Ctrl+- again to delete the next one. Hold the keys down and rows vanish at typing speed.

For deleting multiple selected rows at once, first highlight them with Shift+Down or Shift+Click on row numbers, then press Ctrl+-. A small dialog appears asking what to delete — choose Entire row and press Enter.

Method 3: Delete All Blank Rows in One Pass

CSV exports, downloaded reports, and copied data often arrive with hundreds of empty rows scattered between actual records. Deleting them one by one is brutal. Excel has a built-in trick that finds and removes every blank row in seconds, no matter how large your dataset.

Select the data range that contains the blanks. Press F5 or Ctrl+G to open the Go To dialog. Click the Special button. In the next dialog, choose Blanks and click OK. Excel highlights every empty cell in the selected range.

Now press Ctrl+-. A small dialog appears with four choices — pick Entire row and click OK. Every row that contained a blank cell in your selection disappears, and the surviving rows close up. A 50,000-row export with 12,000 blanks collapses to 38,000 clean rows in under a second.

Warning: this method deletes rows where any selected cell is blank, not only rows where every cell is blank. Before running it, narrow your selection to a single column that is guaranteed to have a value in every real row — usually an ID, date, or order number column. That prevents accidentally deleting partial rows where one optional cell happened to be empty.

Before You Delete Rows — Five-Second Safety Check

  • Save the workbook first (Ctrl+S) so you can recover with Ctrl+Z if something goes wrong
  • Check for hidden filters that might be hiding rows you do not want to delete
  • Look at formulas in other sheets that reference the rows you are about to remove
  • Verify your selection by glancing at the row count in the status bar at the bottom right
  • If working with a Table object, know that Delete Row removes only the table row, not the worksheet row
Excel Spreadsheet - Microsoft Excel certification study resource

Method 4: Delete Rows Based on a Condition (Filter Trick)

Need to drop every row where the status column says Cancelled? Or every row with a sales value under $100? The filter-and-delete combo handles conditional deletion better than any other approach in Excel.

Click any cell in your data, then press Ctrl+Shift+L to add filter arrows to the header row. Click the arrow on the column you want to filter by. Uncheck Select All, then check only the values you want to delete. The sheet now shows only the rows you plan to remove.

Select all visible rows by clicking the first row number and Shift+clicking the last. Press Alt+; (Alt and semicolon) to restrict the selection to visible cells only — this is the critical step that prevents Excel from deleting hidden rows you wanted to keep. Right-click and choose Delete Row.

Remove the filter with Ctrl+Shift+L again. Only the rows that matched your filter are gone. The rest of your data is intact. This technique scales to millions of rows with no performance hit, and you can combine multiple filter columns for compound conditions like Status = Cancelled AND Region = West.

Delete Rows: Method by Use Case

Click the row number on the left, press Ctrl+-. Or right-click the row number and choose Delete. Both take under two seconds and update all dependent formulas automatically. Best for ad-hoc clean-up while reviewing data.

Method 5: Remove Duplicate Rows with the Built-in Tool

Excel has a dedicated Remove Duplicates command that compares rows across one or more columns and deletes any row that repeats. Unlike manual deletion, this one is destructive — there is no preview screen, and once you confirm, the duplicates are gone. Work on a copy of your data the first few times you try it.

Select your data range, including headers. Go to the Data tab and click Remove Duplicates. A dialog lists every column. Check the columns Excel should use to identify duplicates — checking all columns means only fully identical rows are removed; checking just an Email column means any second occurrence of a previously-seen email is deleted regardless of the other column values.

Click OK. Excel reports how many duplicate values it found and how many unique records remain. The order of remaining rows is preserved, and the first occurrence of each unique value is always the one kept. To keep a specific occurrence — for example the most recent — sort the data first before running the tool.

Delete All Rows Where Column A Is Empty

Press Alt+F11 to open the VBA editor. Paste: Sub DelBlank() Columns("A:A").SpecialCells(xlCellTypeBlanks).EntireRow.Delete End Sub Press F5 to run. Cleans empty Column A rows from any active sheet in milliseconds — useful for repetitive monthly report processing.

Deleting Rows Inside an Excel Table

Excel Tables (created with Ctrl+T) behave differently from regular ranges. Deleting a row inside a table removes only the table row, leaving any data in the same worksheet row below the table untouched. This is usually what you want — but it confuses users who expect normal worksheet-row deletion.

To delete a single row inside a Table, right-click any cell in that row and choose Delete > Table Rows. Or click the row number on the left edge, which still selects the whole worksheet row, then Ctrl+- behaves like a normal delete and removes everything across all columns including any data outside the Table to the right.

Tables automatically update formulas, named ranges, and PivotTable sources after deletions. If a PivotTable is connected to a Table you delete rows from, refresh the PivotTable (Alt+F5) to see the new totals. The Table also auto-shrinks its data range so the bottom border tracks the last remaining row.

Excellence Playa Mujeres - Microsoft Excel certification study resource

Right-Click Delete vs Keyboard Shortcut

Pros
  • +Right-click works on touchscreens and tablets where keyboard shortcuts are awkward
  • +Right-click menu shows other options like Insert and Clear Contents at the same time
  • +Discoverable for beginners who do not yet know shortcuts
  • +Same menu across Windows and Mac with identical labels
Cons
  • Slower for repetitive deletions — three clicks versus two key presses
  • Requires mouse hand to leave the keyboard, breaking flow
  • Menu appearance depends on which area you right-clicked, leading to confusion
  • Not scriptable or recordable in macros without extra setup

Recovering Rows You Deleted by Accident

The first defence is always Ctrl+Z. Excel keeps the last 100 actions in its undo stack by default, and a row deletion counts as a single action. As long as you have not closed the workbook or copied something else into the same cells, one or two Ctrl+Z presses restores everything.

If you have closed and reopened the workbook, undo no longer works. Check whether AutoRecover saved a version — go to File > Info > Manage Workbook and look for autosaved drafts. Microsoft 365 with OneDrive also keeps a version history accessible from File > Info > Version History, where you can preview any earlier version and restore selectively.

For workbooks stored locally without AutoRecover or version history, the deleted rows are usually gone for good. Some users keep a daily snapshot of critical workbooks in a separate folder for exactly this reason — a 30-second copy-paste habit that has saved many hours of recovery work. Recovering an unsaved Excel file is a separate process and depends on AutoRecover being enabled.

If the workbook is shared on OneDrive or SharePoint, the file version history goes back 30 days by default. Open the file in the desktop app, click File > Info > Version History, pick a version from before the deletion, and either restore it whole or open it side-by-side and copy the missing rows back into the current version.

Row Recovery Options From Fastest to Slowest

Ctrl+Z Undo

Works immediately after deletion while the workbook is still open. Up to 100 actions in the undo stack. The fastest recovery option, free and built in.

AutoRecover Drafts

File > Info > Manage Workbook shows autosaved versions. Available if AutoRecover was enabled before the deletion. Default save interval is 10 minutes.

OneDrive Version History

Cloud-stored files keep 30 days of versions. Restore the whole file or open a past version side-by-side and copy missing rows back into the current workbook.

Manual Backup Copy

If you keep daily snapshot copies in a separate folder, open the most recent one and copy the deleted rows back. The slowest method but the only one for local-only files without AutoRecover.

Five Common Mistakes When Deleting Rows

Even experienced users make these errors. The first is deleting rows that are referenced by formulas elsewhere in the workbook without checking first. Press Ctrl+~ to show all formulas before bulk deletions, and search (Ctrl+F) for any reference to the row range you plan to remove. Replace direct cell references with INDEX or VLOOKUP lookups before you delete.

The second mistake is deleting hidden rows by accident during a filter. After applying a filter and selecting rows, always press Alt+; to restrict the selection to visible cells only. Without this step, your delete removes both visible and hidden rows, which usually destroys exactly the data you wanted to keep.

The third is deleting rows from a Table that is the source of a PivotTable without refreshing. The PivotTable holds a cached copy of the old data and shows stale totals until you press Alt+F5. Users often spend ten minutes debugging mismatched numbers that are simply a missed refresh.

The fourth is using Clear Contents when they meant Delete. Clear Contents empties the cells but leaves the row in place — formulas that count non-blank rows still include them. Delete actually removes the row and shifts everything below up by one position.

The fifth is forgetting that Remove Duplicates is destructive with no preview. Always copy the data to a new sheet first, or use a helper column with COUNTIF to flag duplicates visually before letting Excel remove them. Practising on sample worksheets before applying these techniques to production data builds the muscle memory that prevents mistakes.

Excel Online vs Desktop: Quick Compatibility Checklist

  • Right-click Delete works identically in Excel Online and desktop apps
  • Ctrl+- shortcut works in Excel Online but press it inside an active cell to avoid browser zoom-out
  • F5 Go To Special > Blanks fully supported in Excel Online as of 2023
  • VBA macros run only in desktop Excel; use Office Scripts for browser automation
  • Mobile Excel supports row deletion via long-press but lacks Remove Duplicates and Go To Special
  • Power Query works in both desktop and Excel Online for non-destructive row filtering

Performance: Deleting Thousands of Rows Quickly

Deleting rows one at a time in a loop is the slowest possible approach in Excel. Each deletion triggers a full recalculation of every formula in the workbook, and on a large sheet this can take 200-500 milliseconds per row. Deleting 10,000 rows individually can run for over an hour. Always batch deletions instead.

The fastest method for bulk deletion is to sort the data so all rows you want to delete are contiguous, then delete the whole block in one operation. A 100,000-row deletion that takes 45 minutes when done row-by-row finishes in under two seconds when deleted as a single contiguous range. Before deletion, turn off automatic calculation with Formulas > Calculation Options > Manual, then turn it back on afterwards.

For repeated bulk deletions across many workbooks, a Power Query approach often beats native deletion entirely. Load the data into Power Query, apply a filter step that excludes the rows you want to remove, and load the result back into the worksheet. The original data stays intact, the operation is non-destructive, and you can refresh it whenever the source updates.

One often-overlooked optimisation is screen updating. Macros that delete rows in a loop run dramatically faster if you set Application.ScreenUpdating = False at the start and restore it at the end. The visual redraw between each deletion is the single biggest performance cost. The same applies to Application.EnableEvents = False, which prevents worksheet change events from firing during the loop.

If you frequently process the same shape of data — for example a monthly export that always needs the same rows removed — record a macro once with the macro recorder (Developer tab > Record Macro), then save it to your Personal Macro Workbook. Bound to a keyboard shortcut or a custom ribbon button, it converts a five-minute manual chore into a single click that runs in under two seconds.

When to Avoid Deleting Rows Entirely

Sometimes the better answer is to hide rows instead of deleting them. Hiding preserves the underlying data and any formulas that depend on it, while keeping the worksheet visually compact. Right-click a row number and choose Hide. To restore hidden rows, select the rows above and below the hidden range and choose Unhide. Audit trails, financial records, and shared workbooks where colleagues might still need the data benefit from hiding rather than deletion.

Filtering is another non-destructive alternative. A filter hides rows that do not match your criteria without removing any data. Once you turn the filter off, every row returns. For exploratory analysis where you want to see only certain rows temporarily, a filter is always safer than deletion. Combine filters with named ranges to build dynamic views that update as your data grows.

Excel Questions and Answers

About the Author

James R. HargroveJD, LLM

Attorney & Bar Exam Preparation Specialist

Yale Law School

James R. Hargrove is a practicing attorney and legal educator with a Juris Doctor from Yale Law School and an LLM in Constitutional Law. With over a decade of experience coaching bar exam candidates across multiple jurisdictions, he specializes in MBE strategy, state-specific essay preparation, and multistate performance test techniques.