What you're actually deleting in Excel
Excel does not have a single "delete file" button the way your computer does. When you want to remove something in Excel, you are choosing between three different actions: deleting the content inside cells (the data), deleting entire rows or columns, or closing and removing the file itself from your computer. Each one works differently and leaves different traces behind.
Most of the time when someone says "delete in Excel," they mean clearing out cell contents — removing text, numbers, or formulas from specific cells while keeping the spreadsheet structure intact. This is the safest option because you can undo it when ready if you change your mind. The other options — removing rows, columns, or the entire file — are permanent once you save.
Key Takeaways
- Deleting cell contents (the data inside) is different from deleting rows or columns, and you can undo it by pressing Ctrl+Z right after.
- To clear just the data, select the cells you want empty, press Delete, and the spreadsheet structure stays the same.
- Deleting a row or column removes the entire line and shifts everything else over, which changes your spreadsheet layout permanently.
- To remove an Excel file from your computer entirely, close it in Excel first, then delete it like any other file using File Explorer or Finder.
- If you delete something by mistake, press Ctrl+Z (Windows) or Command+Z (Mac) when ready to undo, but this only works before you close the file.
How to clear data from specific cells
Select the cells containing the data you want to remove. Click on the first cell, then hold Shift and click on the last cell in the range you want to clear. If the cells are not next to each other, hold Ctrl (Windows) or Command (Mac) and click each cell individually.
Once the cells are highlighted in blue, press the Delete key on your keyboard. The data disappears when ready, but the cells themselves remain in the spreadsheet. The rows and columns stay in place, and nothing shifts. If you change your mind within seconds, press Ctrl+Z (Windows) or Command+Z (Mac) to undo.
This method is the fastest for removing unwanted information without disrupting the rest of your spreadsheet. Use it when you want to keep the same layout but remove specific entries — like clearing old dates, deleting test data, or removing a person's information from a contact list.
How to delete entire rows or columns
Deleting a row or column removes the entire line and shifts everything else to fill the gap. This is permanent and changes your spreadsheet structure, so use it only when you are certain you want that row or column gone.
To delete a row, click on the row number on the left side of the spreadsheet (the number 1, 2, 3, and so on). The entire row highlights in blue. Right-click and select "Delete" from the menu, or go to the Home tab at the top, find the Delete button in the Cells group, and click the arrow next to it to choose "Delete Sheet Rows." The row disappears and all rows below it move up.
To delete a column, click on the column letter at the top (A, B, C, and so on). The entire column highlights. Right-click and select "Delete," or use the Home tab and choose "Delete Sheet Columns." Everything to the right of that column shifts left to fill the space.
If you need to delete multiple rows or columns at once, click the first one, then hold Shift and click the last one to select the range. Right-click and delete them all together. Undo with Ctrl+Z or Command+Z when ready if you make a mistake, but only before you close the file.
How to close and delete an Excel file from your computer
If you want to remove an Excel file entirely — not just clear its contents, but delete the file itself — you must close it in Excel first. Open the File menu and click "Close," or press Ctrl+W (Windows) or Command+W (Mac). If you have unsaved changes, Excel asks whether you want to save. Click "Don't Save" if you do not want to keep those changes.
Once the file is closed, open File Explorer (Windows) or Finder (Mac) and navigate to the folder where the file is stored. Right-click the Excel file and select "Delete" from the menu. On Windows, the file moves to the Recycle Bin. On Mac, it moves to the Trash. If you change your mind, you can recover it from there until you empty the bin or trash.
If you want the file gone permanently without recovery, empty the Recycle Bin (Windows) or Trash (Mac) after deleting it. On Windows, right-click the Recycle Bin on your desktop and select "Empty Recycle Bin." On Mac, click the Finder menu, select "Empty Trash," and confirm.
Clearing formatting without deleting data
Sometimes you want to remove formatting — colors, bold text, borders, or number formats — but keep the actual data. Select the cells you want to change, then go to the Home tab. Click the arrow next to the Eraser icon (labeled "Clear") and select "Clear Formats." The data stays, but the colors and styling disappear.
If you want to remove everything including the data and all formatting at once, select the cells and press Delete instead. This is faster than using the Clear menu when you want the cells completely empty.
How to recover deleted data
If you delete something by mistake and realize it when ready, press Ctrl+Z (Windows) or Command+Z (Mac). This undoes the last action. You can press it multiple times to undo several actions in reverse order, going back through your recent changes. This works only while the file is still open.
Once you close the file without saving, the undo history is gone. If you saved the file after deleting something, the deletion is permanent in that saved version. However, if your computer or cloud storage service keeps automatic backups or version history, you may be able to recover an older version of the file. Check your cloud storage (OneDrive, Google Drive, Dropbox) or ask your IT department if your workplace keeps backups.
Frequently Asked Questions
Can I undo a deletion after I close the file?
No. The undo function only works while the file is open. Once you close Excel, the undo history is erased. If you saved the file after deleting something, that deletion is permanent in the saved version. If you did not save, closing the file without saving discards all changes since the last save.
What is the difference between Delete and Clear?
Delete removes rows or columns and shifts everything else over. Clear removes the contents of cells but leaves the cells and structure in place. For most situations, you want Clear (pressing Delete on selected cells). Use Delete only when you want to remove entire rows or columns.
If I delete a row, do the row numbers change?
Yes. When you delete a row, all rows below it move up and their numbers shift. If you delete row 5, what was row 6 becomes row 5. This is why deleting rows can break formulas that reference specific row numbers — the formula still points to the old row number, which now contains different data.
Can I delete a file that is open in Excel?
Not from File Explorer or Finder while it is open. You must close the file in Excel first. After closing, you can delete it like any other file on your computer. If you try to delete it while it is open, your operating system will not allow it because Excel is still using the file.
What happens if I delete a column that contains formulas?
Any formula in other cells that references the deleted column will show an error (usually #REF!). The formula is broken because the data it was looking for no longer exists. Before deleting a column, check whether other cells depend on it by searching for formulas that reference that column.