How to Delete Rows in Excel

Learn multiple Excel methods to delete rows with step-by-step examples and practical applications.

excelformulaspreadsheettutorial
12 min read • Last updated: 7/2/2025

How to Delete Rows in Excel

Why This Task Matters in Excel

Whether you manage a modest household budget or a multimillion-row data warehouse export, sooner or later you need to delete rows. Clean, streamlined data tables are faster to analyse, easier to summarise, and far less prone to error. In day-to-day business reporting, analysts frequently receive files from customers, suppliers, or public data portals that contain empty records, obsolete SKUs, outdated transactions, or test rows that must be removed before pivot tables, charts, or Power Query steps can run reliably.

Imagine a marketing team importing weekly web-analytics logs comprising hundreds of thousands of rows. Any row where the “User Agent” is missing must be deleted before calculating unique visitor counts, otherwise the totals become inflated. Finance departments face a similar challenge when bank feeds list voided cheques or test payments that auditors explicitly want excluded. HR teams often concatenate multiple recruitment spreadsheets and need to delete withdrawn candidates to avoid skewing hiring metrics. These examples highlight that deleting rows is not just cosmetic; it directly affects decision-making and compliance.

Excel is particularly strong in this area because it combines low-code user actions—context menus, ribbon buttons, and keyboard shortcuts—with deeper automation options such as Power Query, structured table filters, and VBA. Unlike many database tools, Excel displays the full data set visually, making it easier to spot incorrect deletions immediately. If you fail to master row deletion you risk producing summaries with double-counted data, formulas that reference the wrong row after manual shifting, or performance degradation caused by thousands of unnecessary blank lines. Becoming fluent with row deletion also paves the way for more advanced cleaning tasks such as deduplication, record consolidation, and conditional transformations, which all rely on precise selection and removal skills.

Best Excel Approach

The most efficient universal method to delete rows is a two-step approach: (1) filter or select exactly the rows you need to remove, and (2) delete them with a shortcut that shifts the remaining data upward. For small, visually inspected data sets the manual route (Ctrl – after selecting a row) is unbeatable for speed. For larger or repeatable scenarios, combining AutoFilter or Table Filters with Ctrl Shift Space followed by Ctrl – deletes hundreds of targeted rows safely.

Why this combination? Filters guarantee your selection requirements are met, while the keyboard shortcut deletes the visible (filtered) rows in one operation, preserving hidden rows and formulas above or below. Compared with right-click Delete or ribbon commands, the shortcut is equal in function but considerably faster when repeated dozens of times per session. It also works in every modern Excel version, from Excel 2007 through Microsoft 365 for Windows, Mac, and web.

Prerequisites:

  • Data laid out in rows with a unique header row
  • No merged cells in target columns (merged cells impede filtering)
  • If formulas refer to an entire row, verify that deleting does not introduce #REF! errors

Logical overview:

  1. Apply a filter condition that produces only the unwanted rows.
  2. Confirm the status-bar count so you know how many records will be deleted.
  3. Select one cell in the filtered data, press Ctrl A to select all visible rows, then press Ctrl –.
  4. Choose “Table Rows” or “Entire Row” when prompted, depending on whether the data is inside a structured table.

Parameters and Inputs

Because deleting rows is an action rather than a function, the “inputs” are primarily the selected range and Excel environment settings:

Required Inputs

  • Selection: At least one cell in each row you plan to delete. For full-row removal press Shift Space first.
  • Row type: Standard worksheet rows or table rows. Excel’s prompt uses different wording but the result is the same—rows shift upward.

Optional Parameters and Settings

  • Filters: Criteria that determine which rows become visible. Can be number filters, text filters, date filters, or custom formulas in the “Filter by Color” or “Top 10” dialog.
  • Go To Special Options: “Blanks”, “Errors”, “Visible cells only” influence which rows are selected.
  • Worksheet Protection: If the sheet is protected, row deletion requires the “Delete rows” permission.
  • Table Totals Row: When using Excel Tables with a totals row, ensure you exclude that row from deletion unless intentional.

Data Preparation

  • Remove merged cells.
  • Convert raw data to an Excel Table if you expect frequent deletions; tables preserve formatting and formulas automatically.
  • Back up the workbook or enable Track Changes when collaborating.

Edge Cases

  • Formulas referencing deleted rows return #REF!. Use structured references in tables to minimize impact.
  • Hidden rows produced by manual row hiding (not filtering) are deleted if they are part of the selection.
  • External links that point to the deleted sheet range will break; consider using INDEX with row numbers instead of direct links.

Step-by-Step Examples

Example 1: Basic Scenario – Removing Blank Rows

Suppose you receive a 60-row product list in [A1:E60] where the supplier exported blank rows between categories:

Product IDProduct NameCategoryUnit CostUnits in Stock
...data…
(blank row)
...data…

Step 1 – Identify empty rows
Click on the “Product ID” column header (column A). Open the Home ➜ Find & Select ➜ Go To Special … dialog. Choose “Blanks” and press OK. Every blank cell in column A is now selected.

Step 2 – Expand selection to entire rows
With blank cells still highlighted press Ctrl Shift Space. Excel expands the selection to full rows—only the blank lines are now active.

Step 3 – Delete rows
Press Ctrl –. In the dialog choose “Entire Row” and press OK. All blank lines are removed, and the remaining products shift upward.

Why this works
Go To Special isolates blank keys, ensuring no product data is lost. Deleting full rows maintains the table’s integrity.

Variations

  • If blanks appear in multiple columns, first apply an AutoFilter selecting “(Blanks)” on any column, then delete visible rows.
  • Use a quick visual check: look at the status bar for “Count = 0” to confirm you did not keep unwanted blanks.

Troubleshooting
If Ctrl – brings up “Cannot change part of an array”, you may have selected rows containing array formulas. Convert them to dynamic arrays or delete them in a separate step.

Example 2: Real-World Application – Purging Cancelled Orders

You manage a quarterly sales ledger of 55 000 rows in a structured Excel Table named Orders. Column G “Status” shows “Completed”, “Pending”, or “Cancelled”. Management wants all Cancelled orders removed before exporting the ledger to accounting software.

Step 1 – Filter the table
Click anywhere inside Orders. Press Ctrl Shift L to toggle filters. In the drop-down of column G untick “Select All”, check “Cancelled”, then OK. The row count indicator at the bottom changes to “1 024 of 55 000 records found” (example).

Step 2 – Select visible rows
Press Ctrl A once (selects visible cells in the table body). Press Ctrl Shift Space to guarantee full rows, although in tables this is often automatic.

Step 3 – Delete
Press Ctrl –. Because this is a table, Excel prompts: “Delete table rows?” Choose “OK”. All Cancelled orders are removed in one operation; filters remain active so the table now appears empty.

Step 4 – Clear filter
Press Ctrl Shift L again or click Clear Filter on the ribbon. Orders table now reads 53 976 records.

Business impact

  • Reduced file size: pivot caches refresh faster.
  • Synchronized with accounting: no risk of posting voided transactions.
  • Repeatable process: record a Macro or Office Script to reuse next quarter.

Integration tips

  • Add a Slicer connected to the Status field to let non-technical users trigger deletion visually.
  • Combine with Power Query “Filter Rows ➜ does not equal Cancelled” for automated ETL pipelines.

Performance notes
Deleting 1 000 rows out of 55 000 is instantaneous in modern Excel, but if you delete half a million records, consider Power Query or loading the file into Power Pivot instead to avoid memory spikes.

Example 3: Advanced Technique – Deleting Rows by Formula Criteria (Helper Column)

Scenario: You receive an audit trail where “Timestamp” column may have out-of-order entries. Management asks to delete every row where the timestamp is earlier than the opening time 09:00, but only on weekdays and only if “Action” equals “LOGIN”. Pure filter dropdowns cannot capture this multi-layer condition, so you build a helper column.

Step 1 – Insert helper formula
Insert a new column H and name it “DeleteFlag”. In [H2] enter:

=IF(AND(TEXT([@Timestamp],"ddd")<>"Sat", TEXT([@Timestamp],"ddd")<>"Sun",
      [@Timestamp]-INT([@Timestamp])<TIME(9,0,0),
      [@Action]="LOGIN"), "DELETE", "")

Copy down. The formula marks rows that match all conditions with the word DELETE.

Why it works

  • TEXT with \"ddd\" returns the weekday abbreviation.
  • Subtracting INT from the timestamp isolates the time portion.
  • TIME(9,0,0) equals 09:00.
  • AND bundles all criteria.

Step 2 – Filter by helper column
Filter “DeleteFlag” equals DELETE.

Step 3 – Delete
Select visible rows (Ctrl A, Ctrl Shift Space) and press Ctrl – ➜ Table Rows.

Step 4 – Remove helper column
Optionally clear column H to clean up.

Advanced considerations

  • Convert the formula to dynamic array spilling into the full column in Excel 365 for performance.
  • For repeat audits, build the logic directly in Power Query’s “Add Column ➜ Custom Column” and let the query delete during refresh.
  • Use conditional formatting to highlight DELETE rows before removal as a visual check.

Edge case handling

  • If timestamps are text, wrap VALUE() around the timestamp in the formula.
  • If regional settings use different time separators, use TIMEVALUE instead of TIME.

Tips and Best Practices

  1. Master shortcuts: Ctrl – for deletion, Ctrl Shift Space to extend selection, and Ctrl Shift L to toggle filters save hours weekly.
  2. Always confirm row counts: After filtering but before deletion, the status bar shows how many rows are selected—validate against expectations.
  3. Use Excel Tables: Structured references keep formulas intact and automatically expand when new data is appended, preventing deletion from breaking totals.
  4. Keep a backup: Before bulk deletions, copy the sheet or save a version. Version History in OneDrive or SharePoint is equally effective.
  5. Avoid merged cells: They block filters and cause unintended partial deletions. Normalise merged headers by using “Center Across Selection”.
  6. Audit relationships: If other sheets use VLOOKUP to the soon-to-be-deleted rows’ primary key, document the impact or switch to XLOOKUP with missing-key handling.

Common Mistakes to Avoid

  1. Deleting while filters are off: Users sometimes forget to filter first, wiping critical rows. Prevention: always glance at the filter icon before pressing Ctrl –.
  2. Selecting only a cell instead of full rows: Partial deletion shifts cells left, scrambling adjacent columns. Fix by Undo (Ctrl Z) and re-select entire rows (Shift Space).
  3. Ignoring hidden rows: Manually hidden rows are deleted if in selection, potentially removing needed data. Use “Visible cells only” (Alt ;).
  4. Breaking formulas: Deleting rows referenced by INDEX-MATCH or direct row references produces #REF!. Mitigate with structured references or error-handling functions like IFERROR.
  5. Deleting totals rows or subtotals: When using SUBTOTAL or a manual totals row, deletion may wipe summary calculations. Protect totals rows by converting them to a Table Totals Row or locking the cells.

Alternative Methods

Below is a comparison of methods for deleting rows.

MethodBest ForProsConsCompatibility
Manual filter + Ctrl –Everyday tasks under 100 000 rowsFast, no setupRepetitive for periodic jobsAll Excel versions
Go To Special (Blanks/Errors) + Ctrl –Removing blank or error rowsOne-click selectionLimited to simple criteriaAll Excel versions
Power Query \"Remove rows\" stepsData ingested frequentlyAutomated, refreshableRequires loading data through PQExcel 2016+, Microsoft 365
VBA Script / Office ScriptScheduled clean-upFully automated, can loop across sheetsRequires coding knowledgeVBA: all desktop, Script: Microsoft 365
Advanced Filter to another range then replace originalKeeping original intactNon-destructive workflowExtra step of copying backAll Excel versions

Use Power Query when you receive weekly dumps. Choose VBA when you must process multiple workbooks overnight. Stick with manual filtering for ad-hoc, visual review sessions.

FAQ

When should I use this approach?

Use filter-plus-delete when your deletion rule can be expressed as a straightforward filter condition and you want immediate, one-off cleanup without writing code.

Can this work across multiple sheets?

Yes. Run the same steps sheet by sheet, or build a VBA macro looping through Worksheets collection, applying filters, and executing Rows.Delete.

What are the limitations?

Manual deletion cannot be undone once you save and close. Large selections on very big files may freeze older laptops. Power Query cannot delete rows in-place; it outputs a new query table.

How do I handle errors?

Immediately after deletion press Ctrl Z if something looks wrong. For formula errors (#REF!), use Go To Special ➜ Formulas ➜ Errors to locate and fix. Structured references reduce the risk.

Does this work in older Excel versions?

Yes. The core shortcuts have existed since Excel 2003. Only Power Query requires Excel 2010+ with the add-in or Excel 2016+ natively.

What about performance with large datasets?

In desktop Excel, deleting visible rows from a filtered range of 200 000 records may take several seconds. For millions of rows use Power Query or import into Power Pivot/database instead.

Conclusion

Deleting rows is a deceptively simple skill that underpins clean, reliable analysis. Mastering filter-based selection, shortcut-driven deletion, and helper-column logic allows you to cleanse data rapidly and confidently. These techniques integrate smoothly with Tables, PivotTables, and Power Query, forming a cornerstone of professional Excel workflows. Keep practising on sample data, explore automation options, and soon row deletion will become second nature—freeing you to focus on higher-value analytics and insights.

We use tracking cookies to understand how you use the product and help us improve it. Please accept cookies to help us improve.