Excel Practice Test

โ–ถ

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,576
Max rows per sheet
Ctrl+-
Shortcut to delete row
Shift+Space
Select full row
100 actions
Undo 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.

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

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

๐Ÿ“‹ One Row

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.

๐Ÿ“‹ Many Blanks

Select range, F5 > Special > Blanks > OK, then Ctrl+- > Entire row. Handles datasets with up to 1 million rows in under a second. Always select a single guaranteed-non-blank column first to avoid deleting partial rows.

๐Ÿ“‹ Conditional

Apply a filter, show only target rows, select visible rows with Alt+; (Alt+semicolon), then Delete Row. The Alt+; step is mandatory โ€” without it, hidden rows get deleted too. Works for any column type including dates and text.

๐Ÿ“‹ Every Other

Add a helper column with =MOD(ROW(),2). Filter by 0 or 1. Select visible, Alt+;, Delete Row. Delete the helper column when finished. Perfect for downsampling time-series data or thinning out reports.

๐Ÿ“‹ Duplicates

Select range, Data tab > Remove Duplicates. Choose which columns must match for a row to count as a duplicate. Excel keeps the first occurrence and deletes the rest. Always work on a copy first because there is no preview.

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.

Try the Excel Practice Test

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.

Practice More Excel Skills

Excel Questions and Answers

What is the keyboard shortcut to delete a row in Excel?

Select the row by clicking its row number or pressing Shift+Spacebar with any cell in the row selected. Then press Ctrl+- (Ctrl and the minus key). The row deletes instantly with no confirmation dialog. On Mac, use Cmd+- after Shift+Space.

How do I delete all blank rows in Excel at once?

Select the data range, press F5 to open Go To, click Special, choose Blanks, and click OK. All blank cells highlight. Press Ctrl+- and choose Entire row. Every row containing a blank in your range disappears in one operation, even across millions of rows.

Why does deleting a row in Excel give me a #REF! error?

A formula somewhere in the workbook referenced a specific cell in the deleted row using an absolute address like $A$15. When the row vanished, Excel could not find the cell and returned #REF!. Replace direct references with INDEX or named ranges before bulk deletions to prevent this.

Can I delete every other row in Excel?

Yes โ€” add a helper column with the formula =MOD(ROW(),2) which returns 0 and 1 alternately. Apply a filter, show only rows where the helper equals 0 or 1, select the visible rows, press Alt+; to restrict the selection to visible cells, then delete the rows. Remove the helper column when finished.

What is the difference between Delete and Clear Contents in Excel?

Delete removes the row entirely and shifts all rows below up by one. Clear Contents empties the cells but leaves the empty row in place. Formulas like COUNTA still count cleared rows as part of the range, which is why Delete is the correct choice when you want the row gone.

How do I undo a row deletion in Excel?

Press Ctrl+Z immediately to undo. Excel keeps the last 100 actions in its undo stack by default. If you have already closed and reopened the file, check File > Info > Version History on OneDrive or SharePoint files, or look for AutoRecover drafts under File > Info > Manage Workbook.

Does deleting rows in an Excel Table work differently?

Yes. Right-clicking inside a Table and choosing Delete > Table Rows removes only the table row and leaves any data in the same worksheet row outside the table untouched. Selecting the full worksheet row number instead deletes everything across the sheet at that row position.

How do I delete duplicate rows in Excel without losing data?

Copy the data to a new sheet first as a safety net. Select your range, go to Data > Remove Duplicates, and choose which columns must match for a row to count as a duplicate. Excel keeps the first occurrence of each unique combination and removes later copies. Sort first if you need to keep the most recent record.
โ–ถ Start Quiz