To delete only the records currently shown by a filter in Excel, select the filtered data rows, choose Visible cells only, then delete those rows. This keeps records hidden by the filter in place. Save a copy first, and make sure your selection excludes the header and any totals row.
What You’ll Need
- An Excel workbook opened in the desktop version of Microsoft Excel. The steps below are for Microsoft 365 on Windows.
- A filter applied to a continuous list or Excel table, with the rows you intend to remove showing on screen.
- A saved backup or duplicate of the workbook if the data is important. Deleting rows is difficult to reverse after you close the workbook.
The key precaution is to select visible cells only before deleting. A filter hides records from view; it does not select them or remove them. If you simply select a range that includes both shown and hidden records and delete it, you can remove more data than intended.
Step-by-Step
- Save a safety copy. Use File > Save As to create a working copy, or make sure the current file is saved before you begin. This gives you a way back if the wrong records are removed. Ctrl+Z can usually undo a deletion immediately, but do not rely on it after closing the workbook or performing many later actions.
- Check that the list is ready to filter. Your data should have one header row, with a label at the top of each column, and records arranged in rows below it. Avoid blank rows or columns within the list. If the records are already formatted as an Excel table, the filter arrows may already be present in the headers.
- Apply or adjust the filter. Click a cell in the data. If filter arrows are not present, choose Data > Filter. Open the relevant column’s dropdown and select only the values that identify the records you intend to delete. Check more than one filter if needed. For example, to remove closed orders from one region, filter the Status column to Closed and the Region column to the target region.
- Review the visible results before selecting. Scroll through the filtered list and confirm that every displayed record should be deleted. Check a few identifying fields, such as customer, date, or order number. Make sure you are not looking at a filter that hides the records you actually meant to remove. If Excel shows a count in the status bar, treat it as a useful clue, not a substitute for checking the records.
- Select the data cells for the records, not the header. Drag across the data area from the first visible record to the last, including the columns that belong to each record. Do not include the header row, a totals row, notes outside the list, or unrelated cells beside it. The selection can include hidden rows between visible records; the next step tells Excel to limit the operation to visible cells.
- Restrict the selection to visible cells only. On Windows, press Alt+; (Alt plus semicolon). Alternatively, use Home > Find & Select > Go To Special, choose Visible cells only, and select OK. The selection will now contain the displayed cells but not cells in rows hidden by the filter. If you are on a Mac, use the Go To Special route if it is available in your Excel build; keyboard shortcuts can differ by version.
- Delete the selected records. If the list is ordinary worksheet data and deleting the entire worksheet rows will not affect unrelated content, choose Home > Delete > Delete Sheet Rows. The rows that were visible in your filtered selection are removed, while filter-hidden rows remain. Do not choose Clear Contents: that empties cells but leaves blank rows behind.
- Use a table-specific deletion when appropriate. If your records are inside an Excel table and other worksheet content shares the same sheet rows, deleting sheet rows could also remove that nearby content. In that case, select the visible table record cells, restrict the selection to Visible cells only, then right-click within the selected table area and choose Delete > Table Rows if Excel offers that command. This removes table records rather than whole worksheet rows. If the command is unavailable for a multiple-area selection, avoid forcing a sheet-row deletion; use the workaround in Troubleshooting.
- Confirm the result and clear the filter. Check that the matching records are gone and that records hidden by the filter still exist. Then clear the filter from its dropdown, or choose Data > Clear to show the remaining records. Save the workbook after confirming the result.
For example, suppose a list has 500 order records and a filter displays 28 orders with a status of Cancelled. Selecting the data range and choosing Visible cells only limits the deletion to those 28 displayed records. The other 472 records remain, including any rows the filter kept out of view. The exact result depends on the filter criteria and the rows that were visible when you made the selection.
Common Mistakes
- Deleting before choosing Visible cells only. A normal range selection can include filtered-out rows even though you cannot see them. Apply the visible-cells restriction before using a delete command.
- Selecting entire worksheet rows in a sheet with adjacent data. Delete Sheet Rows removes the selected worksheet rows from every column, not just from the filtered list. It can shift or remove unrelated information elsewhere on those rows. Use a table-row deletion for an Excel table when that is the safer option.
- Including the header or totals row. The header contains the filter controls, and a table totals row is not an ordinary record. Keep both out of your selection so they are not deleted with the matching data.
- Using Clear Contents instead of deleting rows. Clear Contents removes values from cells but does not remove the records as rows. You may be left with blank lines in the list, which can interfere with later sorting, filtering, or analysis.
- Assuming all hidden rows are filtered out. A row can also be hidden manually. Visible cells only excludes hidden cells, whether hidden by a filter or another method. Check whether manually hidden rows should remain hidden or be included in your cleanup.
- Trusting the filter without checking its criteria. A filter may have multiple selections or conditions active. Review each relevant dropdown and verify the displayed records before deleting.
Tips
- Use a table for recurring cleanup. Select the list and choose Insert > Table if it is not already an Excel table. Tables keep headers and filters attached to the data as it changes, and table-specific row deletion can help avoid removing unrelated worksheet content.
- Make the selection across the full record width. When using Visible cells only, select the data columns that make up the record, not just one field. This makes it easier to verify what is selected and reduces the risk of treating a partial cell range as the intended records.
- Keep a record of what you removed. Before deleting, note the filter conditions and, if appropriate, copy the visible records to a temporary sheet. This is useful for audits or when another person needs to understand why records disappeared.
- Try a small, reversible check. If the list is unfamiliar, test the process on a copy with a few matching rows first. After deletion, clear the filter and inspect the surrounding records to confirm that hidden rows were not removed.
- Remember that clearing a filter is not deletion. Data > Clear removes the filter criteria and reveals the full list. It does not delete any records. Use the delete command only after you have selected visible cells only.
- On Excel for the web, open the workbook in the desktop app for this workflow. Ribbon features and selection options can differ in the browser. If you cannot find Go To Special or Visible cells only, use Open in Desktop App rather than deleting a broad range by guesswork.
Troubleshooting
Alt+; does not seem to change the selection. First confirm that the worksheet is active and that you have selected a range containing both visible and filtered-out rows. If the shortcut is intercepted by your keyboard or Excel build, use Home > Find & Select > Go To Special > Visible cells only instead. Look for the selection outline around the displayed cells before deleting.
Excel says the command cannot be used on multiple selections. Visible cells only can create several separate selected areas because filtered rows are interrupted by hidden rows. Some delete commands do not work with that kind of selection. Do not respond by selecting the whole range and deleting it without the visible-only restriction. If you are deleting table records, try the table-specific Delete > Table Rows command. If that is also unavailable, copy the visible records to a new sheet, verify the copy, and rebuild the remaining list from the original data on a duplicate workbook, or use a helper column to mark and remove matching records carefully.
Unrelated information disappeared too. You likely used Delete Sheet Rows, which affects the full worksheet row. If the action is still recent, press Ctrl+Z on Windows immediately. On Mac, use Command+Z. If undo is no longer available, restore the saved copy or use version history if the file is stored in OneDrive or SharePoint. For future deletions, use a table-specific row command when nearby cells must be preserved.
Some matching rows remain. Check whether the filter includes every value or condition you meant to remove. Also inspect manually hidden rows: they are not visible selections, even if they match your intended criteria. Adjust the filter, show any manually hidden rows that should be deleted, and repeat the selection-and-delete process on the remaining targets.
The list has blank rows after the operation. That usually means Clear Contents was used instead of deleting rows. Filter for blank records, select the visible rows only, then use the appropriate Delete Sheet Rows or table-row command. Confirm that the blank rows are genuinely part of the unwanted records before removing them.
Frequently Asked Questions
Will this delete rows hidden by the filter?
Not if you first select Visible cells only and then use a delete command. That restriction excludes rows hidden by the filter. If you skip it, a selection may include hidden records, so do not delete until you have confirmed the visible-only selection.
Does deleting filtered rows remove them permanently?
It removes the selected rows from the workbook, rather than merely hiding them. You can usually undo the action immediately with Ctrl+Z on Windows or Command+Z on Mac. A saved backup is safer, especially if you will continue editing before noticing a problem.
Can I delete filtered records from an Excel table?
Yes. Filter the table, select its visible data records, and use Visible cells only. Prefer the table-specific Delete > Table Rows command when available, especially if other worksheet content occupies the same rows. Delete Sheet Rows affects the whole worksheet row.
Can I delete only the visible cells’ contents instead of removing rows?
Yes, but that is a different result. After selecting visible cells only, Clear Contents empties those cells while leaving the worksheet rows in place. Use it only when you want blank cells, not when you want the records removed from the list.
Can I do this in Excel for Mac?
The general approach is the same: filter the list, select the data range, choose Visible cells only, and delete the intended rows. Use the Go To Special menu if the Windows shortcut does not apply. Menu placement and available keyboard shortcuts can vary between Mac versions.
What if I need to keep a copy of the filtered records?
Before deleting, select the visible records and copy them to a new worksheet or workbook. Check that the pasted copy contains the expected rows, then return to the original data and carry out the deletion. This gives you a separate reference if the records are needed later.
Related
- Copy the Same Date Down an Excel Column Without Auto-Fill
- How to Copy Multiple Sheets in Excel Without Errors
- How to Copy Only Filtered Data in Excel Without Hidden Rows
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Excel Page Break Preview Without Page Numbers: What to KnowIn Excel for Microsoft 365 on Windows, you cannot hide the large page-number labels while staying in Page…
- Excel File Corrupted? How to Repair and Recover ItIf an Excel file is corrupted, first make a copy of it, then try Excel’s built-in repair: in…
- Conditional Formatting Colour in Excel: Rules and FixesIn Excel, conditional formatting colour is a fill, font, border, data bar or icon that appears automatically when…
- Excel Data Modeling: How It Works and When to Use ItExcel data modeling means organizing related information into structured tables and connecting them so you can analyze the…
- Excel: Hide Duplicates Based on One Column in a ListTo hide entire rows when a value repeats in one column, add a helper column, mark the first…
- Excel Dropdown List: Create, Edit, and Troubleshoot OneTo make a dropdown list in Excel for Microsoft 365 on Windows, select the cell or cells, choose…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.