What you can delete in Excel, and why it matters
Excel lets you delete several different things, and each one works differently. You can delete the entire file from your computer, delete rows or columns from a spreadsheet, or clear just the data inside cells while keeping the structure intact. Most of the time, people mean one of the last two — removing a row of data or wiping out what's in a cell — but the method depends on what you're actually trying to get rid of.
The most common mistake is deleting a row when you only meant to clear its contents, or vice versa. If you delete a row, everything below it shifts up and your spreadsheet structure changes. If you clear contents, the empty row stays there. This guide walks you through each type of deletion so you know which one to use.
Key Takeaways
- Deleting a row removes it entirely and shifts everything below it upward; clearing contents leaves the row in place but empties the cells.
- Right-click on a row number or column letter to delete the entire row or column, then confirm the action.
- Select a cell or range of cells and press Delete to clear only the data inside, leaving the cells themselves in place.
- To delete an Excel file from your computer, find it in File Explorer (Windows) or Finder (Mac) and move it to Trash or Recycle Bin.
- Undo (Ctrl+Z on Windows, Command+Z on Mac) reverses any deletion if you change your mind immediately.
Delete an entire row or column
Deleting a row removes the entire horizontal line of cells and shifts everything below it up one row. This is useful when you have a row of data you no longer need and want to close the gap. To delete a row, click on the row number on the left side of the spreadsheet — the number itself, not a cell in that row. The entire row highlights in blue.
Right-click on the highlighted row number and select Delete from the menu that appears. Excel removes the row and everything below it moves up. If you delete row 5, what was in row 6 is now in row 5.
Deleting a column works the same way. Click on the column letter at the top (A, B, C, and so on), right-click it, and select Delete. The entire column disappears and columns to the right shift left to fill the space.
If you delete something by accident, press Ctrl+Z (Windows) or Command+Z (Mac) immediately to undo it. This works as long as you have not closed the file.
Clear the contents of cells without removing the cells
If you want to empty what is inside cells but keep the cells themselves in place, select the cells first. Click on a single cell, or click and drag to select multiple cells. You can also click on the first cell, hold Shift, and click on the last cell to select a range.
Once the cells are highlighted, press the Delete key on your keyboard. The contents disappear but the cells remain. The row or column structure does not change. This is the safest option if you are unsure whether you want to remove the cells themselves or just the data.
If you want more control over what gets deleted — for example, to clear only the formatting but keep the numbers, or clear only comments — right-click the selected cells and choose Clear Contents. This removes only the data, leaving any cell formatting (like color or bold text) in place.
Delete an Excel file from your computer
To remove an Excel file entirely from your computer, you need to find it in your file manager, not inside Excel itself. On Windows, open File Explorer and navigate to the folder where the file is stored. Right-click the file and select Delete. The file moves to the Recycle Bin.
On a Mac, open Finder, locate the file, right-click it, and select Move to Trash. The file goes to the Trash folder. On either system, you can recover the file if you change your mind — just open Recycle Bin (Windows) or Trash (Mac) and restore it.
If you want to permanently remove the file so it cannot be recovered, empty the Recycle Bin or Trash after deleting it. On Windows, right-click the Recycle Bin icon on your desktop and select Empty Recycle Bin. On Mac, open Trash, click Empty in the top right corner, and confirm.
Delete multiple rows or columns at once
If you need to remove several rows or columns that are next to each other, you can select them all at once and delete them together. Click on the first row number you want to delete, then hold Shift and click on the last row number. All rows between them highlight in blue. Right-click and select Delete.
This works the same way for columns. Click the first column letter, hold Shift, and click the last column letter. Right-click and select Delete. All selected columns disappear at once.
If the rows or columns you want to delete are not next to each other, click the first one, then hold Ctrl (Windows) or Command (Mac) and click each additional row or column number. They all highlight. Right-click and select Delete to remove them all.
Undo a deletion if you made a mistake
If you delete something and realize you did not mean to, undo the action immediately. Press Ctrl+Z on Windows or Command+Z on Mac. This reverses the last action you took. You can press it multiple times to undo several actions in reverse order.
Undo works as long as the file is still open. Once you close the file without saving, you cannot undo deletions from before you closed it. If you closed the file and want to recover it, check your Recycle Bin or Trash — you may be able to restore the entire file from there.
Frequently Asked Questions
What is the difference between deleting and clearing?
Deleting removes the row or column entirely and shifts everything else to fill the gap. Clearing removes only the data inside the cells, leaving the cells and their position in the spreadsheet unchanged. Use Delete for rows or columns you do not need anymore. Use Clear Contents for data you want to remove but want to keep the structure of your spreadsheet.
Can I delete a row without losing the data below it?
Yes. If you want to keep the data but just remove it from view, select the row and press Delete instead of right-clicking and selecting Delete. This clears the contents without removing the row itself. Everything stays in the same position.
How do I recover a file I deleted from my computer?
Check your Recycle Bin (Windows) or Trash (Mac) immediately. Right-click the file and select Restore (Windows) or Put Back (Mac). If you already emptied the Recycle Bin or Trash, recovery is much harder and may not be possible without specialized software.
Can I undo a deletion after I close the file?
No. Undo only works while the file is open. Once you close it, the undo history is gone. If you closed the file and want to recover deleted rows or columns, you may have a backup copy or an earlier version saved by your computer's system backup, but the undo command cannot help.
What happens if I delete a column that has formulas in other columns?
Any formula that refers to cells in the deleted column will show an error (usually #REF!). Before deleting a column, check whether other cells reference it. You can search for formulas that use that column by using Find & Replace to search for the column letter.