How to unhide and delete rows in Excel
Hidden rows in Excel take up space in your file but do not appear on screen. To delete them permanently, you must unhide them first, then select and delete them. Excel does not let you delete a row while it stays hidden — you have to make it visible before the deletion will work.
The process takes about two minutes and works the same way in Excel for Windows, Mac, and the web version. You will select a range that includes the hidden rows, unhide them, then delete the visible selection. The rows below will shift up automatically to fill the space.
Key Takeaways
- Hidden rows must be unhidden before you can delete them; Excel will not let you delete a row you cannot see.
- Select the rows above and below the hidden ones, right-click, and choose "Unhide" to make them visible again.
- Once unhidden, select those rows and right-click to choose "Delete" to remove them permanently from the sheet.
- If you are not sure which rows are hidden, select all cells with Ctrl+A (or Cmd+A on Mac), then unhide to reveal everything.
- You can undo a deletion with Ctrl+Z or Cmd+Z immediately after, but only if you have not saved the file yet.
Finding which rows are hidden
Hidden rows leave a gap in the row numbers on the left side of your sheet. If you see row 5 followed directly by row 8, rows 6 and 7 are hidden. The row numbers will skip, but the gap is usually small enough that you might miss it at first glance, especially in a large spreadsheet.
If you want to see all hidden rows at once, select your entire sheet by clicking the box in the top-left corner where the row numbers and column letters meet. Then right-click on any row number and choose "Unhide." This reveals every hidden row in the sheet at the same time, so you can see the full picture before deciding what to delete.
Unhiding rows before deletion
Click on the row number just above the hidden rows, then hold Shift and click on the row number just below them. This selects a range that includes the hidden rows in the middle. For example, if rows 6 and 7 are hidden between rows 5 and 8, click on 5, then Shift-click on 8. The entire range from 5 to 8 will highlight in blue.
Right-click on the selected row numbers and choose "Unhide" from the menu. The hidden rows will appear on your screen. They will remain selected after unhiding, which makes the next step easier and faster.
Deleting the rows permanently
With the rows now visible and still selected, right-click on the selected row numbers again. Choose "Delete" from the menu. Excel will remove those rows from the sheet entirely, and the rows below will shift up to fill the space. The deletion happens immediately.
If the rows are no longer selected after unhiding, click on the first row you want to delete, then Shift-click on the last one to select the range again before right-clicking to delete. Make sure you have the correct rows selected before you click Delete, since the action cannot be undone after you save.
Deleting hidden rows in Excel Online
The web version of Excel works slightly differently. Select the rows above and below the hidden ones, right-click, and look for "Unhide" in the menu. Once they appear, select them again and right-click to find the "Delete" option. The steps are the same as the desktop version, just accessed through a browser.
If you do not see an "Unhide" option in the right-click menu, try clicking the Home tab at the top of the ribbon, then look for a "Format" button. Click it and choose "Hide & Unhide," then "Unhide Rows." This opens the same unhiding function through a different path and works when the context menu does not show the option.
Why rows get hidden in the first place
Rows are usually hidden to clean up a spreadsheet view without losing the data underneath. Someone might hide rows to focus on certain columns, to reduce clutter during a presentation, or to keep supporting details out of sight while showing summary rows to an audience.
Hidden rows stay hidden when you save the file, so if you open a spreadsheet and notice missing row numbers, the person who created it probably hid them on purpose. Deleting them is permanent, so make sure you do not need the data before you remove them. If you are unsure, unhide first and review the content to confirm what you are about to delete.
Frequently Asked Questions
Can I undo a row deletion after I delete hidden rows?
Yes. Press Ctrl+Z (or Cmd+Z on Mac) immediately after deletion to undo. This works as long as you have not made other changes since the deletion. If you have already saved the file, undo may not work depending on how long ago you saved.
What if I delete rows by mistake?
Use Ctrl+Z or Cmd+Z to undo the deletion right away. If you have already closed the file, the deletion is permanent and cannot be recovered unless you have a backup copy saved elsewhere.
Can I delete hidden rows without unhiding them first?
No. Excel requires you to unhide rows before you can delete them. The delete function only works on visible rows. If you try to delete without unhiding, nothing will happen.
How do I know if a row is hidden or if it just does not contain data?
Look at the row numbers on the left. If they skip (for example, 5, 6, 9, 10), rows are hidden. If the numbers are consecutive but a row appears empty, it just contains no data. Empty rows can be deleted the normal way without unhiding first.
Will deleting hidden rows affect my formulas?
Yes. If other cells contain formulas that reference the rows you delete, those formulas will break or return an error. Review any formulas in your sheet before deleting rows, especially if they use SUM, AVERAGE, or other functions that reference ranges.