To delete only the rows currently shown by an Excel filter, select the filtered data cells, choose Visible cells only, and delete those rows—not the entire unfiltered data set. In Excel for Microsoft 365 on Windows, you can select the cells and press Alt+; before deleting. Hidden rows are excluded from that selection, so they remain. Save a copy first, and use the table-row delete command if your data is an Excel table.
What You’ll Need
- An Excel workbook with a header row and a filter applied to the records you want to remove. You can turn on filters from Data > Filter.
- A backup or saved copy of the workbook. Deleting rows is not always easy to reverse after you save, close, or make other changes.
- For the safest removal when other information shares the same worksheet rows, an Excel table. Select a cell in the data and use Insert > Table if you need to convert a regular range; make sure the range and headers are correct before proceeding.
Step-by-Step
- Save a copy of the workbook. Use File > Save As to make a separate copy, or save your current work before beginning. Deleting filtered records changes the data, and Undo may not be available after later actions or after closing the file.
- Check what the filter is showing. Click the filter arrow in the relevant column and confirm the selected values or conditions. Look through the visible records to make sure they are the ones you intend to remove. Filtering hides rows; it does not delete them, and changing the filter later can reveal them again.
- Select the records, not the header. Click and drag across the data cells in the visible records you want to delete. Include the relevant columns for each record, but do not include the header row, a totals row, or unrelated cells. If you want to remove every record displayed by the filter, select the data area beneath the headers. Avoid clicking and dragging row numbers: that can make it harder to confirm that only visible rows are selected.
- Restrict the selection to visible cells. On Windows, press
Alt+;(Alt plus semicolon). This is Excel’s Visible cells only command: it removes filtered-out rows from the selection. You can also use Home > Find & Select > Go To Special, choose Visible cells only, and select OK. The marching-ants outlines may show several separate areas; that is normal when filtered rows are interspersed with hidden rows. - Delete the selected records using the appropriate command. If the data is an Excel table, select Table Design > Delete > Delete Table Rows. This removes the selected records from the table without using a command that deletes entire worksheet rows. If your data is a normal worksheet range, choose Home > Delete > Delete Sheet Rows. That command removes the selected worksheet rows, so first check whether unrelated information elsewhere on those same rows would also be affected. If it would, use a table or reorganize the data before deleting.
- Confirm that the right rows were removed. Check the remaining visible records. Then clear the filter using Data > Clear, or open the filter menu and choose Clear Filter From [column name]. Inspect the previously hidden records to verify that they remain. If your filter is still active, the row numbers may skip values; that is expected and does not mean those rows were deleted.
- Save and check the workbook. Save your changes, then check formulas, totals, charts, and any references that use the deleted records. Removing rows can change results in calculations that refer to the data. If a table has a totals row, confirm that its totals still include the records you expect.
Example: Suppose a table has 500 order records and you filter the Status column to show 18 records marked Cancelled. Select the visible record cells beneath the headers, choose Visible cells only, and delete the table rows. The 18 displayed records are removed, while the other 482 records remain. Clear the filter afterward to check the full list. If the filter shows zero records, there is nothing to delete.
In Excel for the web, the visible-cells shortcut and some selection options can differ from Windows desktop Excel. If you cannot find Visible cells only or cannot make a selection that excludes hidden rows, open the workbook in Excel for Microsoft 365 on Windows and follow the steps above. On Mac, use the Home tab’s Find & Select menu and Go To Special, when available, to choose Visible cells only; keyboard shortcuts can differ by keyboard layout and Excel version.
Common Mistakes
- Deleting without selecting visible cells only. A selection made across a filtered range can include hidden cells, depending on how it was selected. Apply Visible cells only before using a delete command, and verify that the selection excludes the hidden records.
- Including the header or totals row. A header can disappear or a table’s totals row can be removed if it is part of the selection. Select only the records beneath the header and check the bottom edge of the selection before deleting.
- Using Delete or Backspace and expecting rows to disappear. Those keys typically clear cell contents; they do not remove worksheet rows or table records. Use Delete Table Rows for a table or Delete Sheet Rows for an ordinary range.
- Deleting whole worksheet rows when other data shares those rows. Delete Sheet Rows affects the entire worksheet row, not just the filtered columns. If notes, another list, or other information sits in adjacent columns, it could be removed too. Use an Excel table’s Delete Table Rows command for table records, and review the layout before acting on a normal range.
- Assuming hidden rows are deleted because row numbers skip. Filters hide rows, so the visible row numbers commonly jump. Clear the filter after deleting to check which records actually remain.
Tips
- Turn the list into a table before a recurring cleanup. Tables keep headers and records organized, expand as new records are added, and offer a table-specific row deletion command. Confirm that the table includes all intended columns and no unrelated cells.
- Use a second filter condition to narrow the target records. For example, filter for both a specific status and a date range if you only intend to remove old cancelled records. Review the filtered result before selecting it.
- Delete in batches if the result is large. Removing a large number of records at once can make it harder to spot a selection mistake. Filter to a smaller group, delete it, check the result, and continue if appropriate.
- Keep a record of the filter criteria. If you may need to explain or repeat the cleanup, note the column names and selected conditions before deleting. The filter may clear or the data may change after rows are removed.
- Use Undo immediately if the wrong records disappear. Press Ctrl+Z on Windows before making additional changes. On Mac, use Command+Z. Undo may not restore the original state after you close the workbook or perform actions that clear the undo history, so keep the backup.
Troubleshooting
Hidden records disappeared too. Undo immediately with Ctrl+Z on Windows or Command+Z on Mac. Reapply the filter, select the data cells again, and choose Visible cells only before deleting. If Undo is no longer available, close without saving if you can safely discard all changes made since the last save, or restore the separate backup. Do not continue editing a workbook whose record count you have not checked.
Excel says the command cannot be used on multiple selections. Filtered visible cells form separate selection areas, and some deletion methods may reject that selection. Confirm that you used Visible cells only, then try the relevant row-delete command for the data type: Table Design > Delete > Delete Table Rows for a table, or Home > Delete > Delete Sheet Rows for a normal range. If the command still fails, check that you are not trying to delete cells from a protected sheet or mixing cells outside the filtered range into the selection.
The contents disappeared but the rows are still there. You probably pressed Delete or Backspace, which clears cell contents. If the action just happened, undo it, then select the visible records and use the table-row or sheet-row command instead. If you meant to remove the records but already cleared them, filter for the resulting blank rows and delete those rows carefully. Check that the blanks are not legitimate records before removing them.
The delete command is unavailable or the sheet is protected. Check Review > Protect Sheet. If you have permission, unprotect the sheet using Review > Unprotect Sheet; Excel may ask for a password. If you do not have the password or authorization, ask the workbook owner to make the change. Also check whether the workbook is in a mode that prevents editing, such as read-only access.
The rows are gone from the table, but other cells changed too. If you used Delete Sheet Rows, Excel removed entire worksheet rows. Undo if possible. For future deletions, use the table-specific Delete Table Rows command, or move unrelated information so it does not share rows with the records being removed. Check your backup before attempting to rebuild affected data.
I cannot find Visible cells only on a Mac or in the browser. In desktop Excel for Mac, look under Home > Find & Select > Go To Special. Ribbon labels and shortcuts can vary across versions. Excel for the web does not expose every desktop selection command in the same way; open the workbook in the Windows or Mac desktop app if you cannot confirm that hidden rows are excluded from the selection.
Frequently Asked Questions
Will deleting filtered rows also delete the hidden rows?
Not when the selection is limited to visible cells and you use the correct delete command. Hidden rows should remain. Clear the filter afterward and inspect the records to confirm.
Do I need to press Alt+; before deleting?
For the Windows desktop method, yes: Alt+; selects visible cells only in the current selection. You can use Home > Find & Select > Go To Special > Visible cells only instead. This selection step helps prevent filtered-out records from being included.
Should I choose Delete Table Rows or Delete Sheet Rows?
Use Delete Table Rows when the records are in an Excel table. Use Delete Sheet Rows for a normal worksheet range only when removing the entire worksheet rows is appropriate. The latter can affect unrelated information in other columns on those rows.
Can I delete filtered rows without removing them from the worksheet?
Yes. Select the visible cells and press Delete to clear their contents, but that leaves blank rows in place. This is different from deleting records. If you want the rows gone, use the relevant row-delete command and verify the result after clearing the filter.
Can I recover rows after deleting them?
Usually, press Ctrl+Z on Windows or Command+Z on Mac immediately. If you have saved, closed the workbook, or made other changes, Undo may not be available. A backup or version history may help restore the data, so save a copy before a bulk deletion.
Does this method work for a table with a totals row?
Yes, but keep the totals row out of your selection. Select only the filtered records, choose Visible cells only, and use Delete Table Rows. Afterward, check the totals row to make sure the table still calculates the result you expect.
Related
- How to Copy a Tab in Excel Without Losing Formatting
- How to Copy a Table in Excel Without Losing Formatting
- How to Copy a Line in Excel: Rows, Cells, and Shortcuts
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Delete Emails From Archive in Outlook: Step-by-StepTo delete archived emails in Outlook, open the Archive folder, select the messages, and choose Delete. Outlook moves…
- How to Create a Signature Line in Microsoft OutlookTo create an email signature line in Outlook, open the signature settings for your version of Outlook, write…
- Conditional Formatting in Word: What Works and What Doesn’tMicrosoft Word does not have Excel-style conditional formatting that automatically changes a cell’s color or font according to…
- Excel Sum Minus: How to Add and Subtract Numbers in ExcelTo subtract a value from a total in Excel, combine SUM with the minus sign: with numbers in…
- How to Sort Horizontally in Google Sheets by a RowTo sort columns from left to right in Google Sheets, select the range, choose Data > Sort range…
- How to Add a Checkbox in Excel With Words Beside ItTo add a clickable checkbox with words beside it in Microsoft Excel for Microsoft 365 on Windows, select…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.