To delete only visible rows in Excel, filter or hide the rows you want to keep, select the data range, choose Home > Find & Select > Go To Special > Visible cells only, then delete the selected rows. This prevents hidden rows in the selected range from being included. Save a copy first, and check the selection before confirming any deletion.
What You’ll Need
- Excel for Microsoft 365 on Windows for the shortcuts and ribbon paths below. Excel for Mac has similar menu commands, though shortcuts and labels can differ.
- A worksheet with the rows you intend to remove, plus a filter or manually hidden rows that separate them from rows you want to keep.
- A saved copy of the workbook if the data is important. Deleting worksheet rows can affect formulas, references, charts, and other linked content.
Step-by-Step
- Save a working copy. Use File > Save As to make a separate copy before you delete anything. Deleting rows can often be undone immediately with Ctrl+Z, but you may lose that option after closing the workbook or performing other actions. A copy is a safer fallback, especially if the sheet feeds reports or formulas.
- Decide which rows should remain. If the rows to remove are identifiable by values, filter the list so the rows you want to delete are visible and the rows you want to keep are hidden. For example, to remove completed orders, filter the Status column to show only Completed. Check the displayed results carefully before proceeding. If your sheet already contains manually hidden rows, confirm that the visible rows are the ones you intend to remove.
- Check that the data is set up as expected. If the list has headings, confirm that the filter dropdowns are on the header row and that the header itself is not part of the rows you plan to remove. A filter can be applied from Data > Filter. If you have a formal Excel table, use its filter arrows; the table headings are not data rows.
- Select the range containing the records. Select the cells that cover the data rows you are considering, including the relevant columns, but leave out unrelated worksheet content. You can drag across the range or click a cell in the data and use Ctrl+A once to select the current data region. If Ctrl+A selects the entire worksheet or a larger area than expected, press Esc and select the intended range directly. Do not select an entire worksheet column if there is unrelated content below the list.
- Limit the selection to visible cells. On Windows, press Alt+; (Alt and semicolon). This is Excel’s Visible cells only shortcut. Alternatively, use Home > Find & Select > Go To Special, choose Visible cells only, and click OK. The selection should now exclude rows hidden by the filter or hidden manually. If you want to check it, look for the highlighted visible cells; hidden rows should not become part of the selection.
- Delete the selected worksheet rows. Press Ctrl+- (Ctrl and the minus key). In the Delete dialog, choose Entire row and click OK. You can also use Home > Delete > Delete Sheet Rows if that command is available for the current selection. The visible records you selected should be removed, while the hidden rows remain in the sheet. Avoid choosing Shift cells up: that removes cells rather than whole records and can misalign columns.
- Review the result before saving again. Clear the filter with Data > Clear or adjust it to show all records. Check that the intended records are gone and that previously hidden rows still exist. Also scan adjacent columns for intact records and confirm that formulas, totals, and table formatting still behave as expected. Save once the result is correct.
- For a simpler filtered list, you can delete through the visible row headers. With a filter active, select the row headers for the displayed records you want to remove, not the header row, then use Home > Delete > Delete Sheet Rows. Check the selected rows and the filter results first. If your selection includes hidden rows or Excel warns that the action cannot be applied to a multiple selection, cancel and use Go To Special > Visible cells only instead. Excel versions and selection shapes can affect which deletion commands are available.
Mac note: Excel for Mac provides Go To Special through the Home tab’s Find & Select menu in supported desktop versions. Keyboard shortcuts may differ from Windows, so use the menu path rather than assuming Alt+; works on your keyboard. Excel for the web has fewer selection and editing features; if you cannot choose Visible cells only, open the workbook in the desktop app for this procedure.
Common Mistakes
- Deleting before limiting the selection. A normal selection can include hidden rows even when you cannot see them. Applying a filter does not automatically mean every delete command is restricted to visible cells. Use Visible cells only, or carefully verify the selected row headers before deleting.
- Removing cells instead of entire rows. Choosing Shift cells up can pull one column’s data upward while leaving other columns in place. For a record-based list, choose Entire row or Delete Sheet Rows so the fields in each record stay together.
- Including the header row. If the heading is selected, it can be deleted along with the records. Keep the header outside the range, or check that the filter heading is not among the highlighted rows before confirming.
- Selecting more than the list. Whole-column or whole-sheet selections may include notes, totals, or other tables. Select only the relevant list, especially when the worksheet has several separate blocks of data.
- Assuming hidden means protected. Hidden rows are still part of the worksheet. They are not automatically safe from every editing operation. The visible-cells-only selection is the key safeguard when working with a range containing hidden rows.
- Deleting the wrong filtered results. Filter criteria can be easy to misread, particularly when several columns have filters. Review the visible records and the filter indicators before deleting. If the criteria are unclear, clear the filters, reapply them one at a time, and verify the result.
Tips
- Use a temporary filter when you can. Filtering to show the records to remove is often easier to verify than working around scattered manually hidden rows. When you are finished, clear the filter to review the complete list.
- Test the process on a small range first. If you are unsure how a selection behaves in your workbook, copy a few representative rows to a temporary sheet and try the steps there. This helps reveal whether hidden rows, merged cells, or a complex layout interfere.
- Keep complete records together. Select the full width of the data, not just the column that identifies the records. Deleting entire rows removes each record consistently across its columns.
- Consider downstream effects. Formulas that refer to deleted rows may adjust, and charts, pivot tables, summaries, or external links may need review or refresh. If the data is used elsewhere, check those outputs after deleting.
- Use Undo promptly if the result is wrong. In Windows Excel, Ctrl+Z reverses the most recent deletion. On Mac, use Command+Z. Undo immediately, before making further edits, and then repeat the process with a more carefully checked selection.
- Keep a record of what you removed. For audit-sensitive lists, copy the matching records to a separate sheet or workbook before deleting them. A saved copy preserves the original; a separate archive sheet can make the removed records easier to find.
Troubleshooting
Hidden rows were deleted too. If the deletion is the most recent action, press Ctrl+Z on Windows or Command+Z on Mac immediately. Reselect the data range, choose Home > Find & Select > Go To Special > Visible cells only, then delete again. Do not rely on the filter alone to protect hidden rows.
Excel says the command cannot be used on multiple selections. Some delete actions cannot process a discontiguous selection in the way you expect. Cancel the dialog. Try selecting the visible row headers in the filtered list and use Home > Delete > Delete Sheet Rows. If that still fails, use the desktop app, reduce the selection to a single contiguous visible block, or remove smaller batches and verify each one.
The Visible cells only option is unavailable or the shortcut does nothing. Confirm that you have selected a range first. Then open Home > Find & Select > Go To Special and select Visible cells only. On a Mac, use the menu because the Windows Alt+; shortcut may not apply. In Excel for the web, open the file in desktop Excel if the command is missing.
Some records you meant to delete remain. The filter may not include every target value. Check for extra spaces, different spellings, blank cells, or another active filter in a different column. Clear the filters, inspect the full list, and reapply the criteria. Then select visible cells only and repeat the deletion.
The wrong cells moved or columns no longer line up. Undo immediately. You may have chosen Shift cells up instead of Entire row, or deleted only cells in one column. Re-select the complete record range and choose Entire row in the Delete dialog. If Undo is no longer available, restore the saved copy rather than trying to reconstruct records by hand.
A table, formula, or summary looks different afterward. Deleting rows changes the table’s contents and can change formula references or summary results. Clear filters and inspect the affected areas. Refresh a pivot table if needed, and verify that totals and charts still use the intended source range. If results cannot be restored confidently, use the saved copy.
Frequently Asked Questions
Does filtering alone make it safe to delete only visible rows?
Not always. A filter hides records from view, but the selection and delete command still matter. Select Visible cells only before deleting, or carefully use the displayed row headers and check that hidden rows are excluded.
What does Alt+; do in Excel?
In Excel for Windows, Alt+; selects visible cells only within the current selection. It is useful after filtering or hiding rows because it leaves hidden cells out of the selection. If the shortcut does not work on your device, use Home > Find & Select > Go To Special > Visible cells only.
Can I delete visible rows without deleting hidden rows manually?
Yes. Select the relevant data range, choose Visible cells only, and delete Entire row. This works for rows hidden by a filter and rows hidden manually, as long as the selection is limited to the intended list and the visible-only step is applied.
Will this delete the header row or blank rows?
Only if they are included in the selected range and visible. Exclude the header from your selection. Blank rows that meet the filter criteria can also be selected, so review the highlighted range before confirming deletion.
Can I do this in Excel for Mac or Excel for the web?
Excel for Mac has a Go To Special option in supported desktop versions; use the menu if the Windows shortcut differs. Excel for the web may not expose the same visible-cells selection command. If you cannot find it, open the workbook in Excel for Microsoft 365 on Windows or Mac and perform the deletion there.
Can I recover rows after deleting them?
Use Ctrl+Z on Windows or Command+Z on Mac right away if the deletion is still the latest action. If Undo is unavailable, restore the saved copy or retrieve the rows from an archive. That is why making a copy before editing is worthwhile.
Related
- Copy Only Filtered Data in Excel: Step-by-Step
- How to Copy Into Multiple Cells in Excel Without Errors
- How to Copy in Reverse Order in Excel
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Excel Test Cell Content: How to Check Values and TypesTo test what a cell contains in Excel, use a formula suited to the question: =ISBLANK(A2) checks whether…
- Reverse Text to Columns in Excel: How to Recombine DataYes. To reverse Excel’s Text to Columns operation, combine the resulting cells with a formula such as =TEXTJOIN("…
- Customer Contact List Template for ExcelA customer contact list template for Excel is a structured worksheet for recording and finding customer names, contact…
- Text to Excel Converter: Import Text Into ColumnsA text to Excel converter turns a plain-text file or pasted text into worksheet cells. In Excel for…
- Excel Data Analysis: How to Build a Useful ModelYes—Excel can model data for analysis using structured tables, formulas, PivotTables, charts, and, where available, the Data Model.…
- Excel Insert Page Break Shortcut Key and How It WorksIn Excel for Microsoft 365 on Windows, press Alt+P, B, I to insert a page break: press the…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.