The fastest way to delete blanks in Excel
The quickest method depends on what you're deleting. If you have blank rows scattered through your data, use the sort or filter method — it takes under a minute. If you have blank cells within a column (cells with nothing in them, surrounded by data), use Find & Replace with a regular expression. If entire columns are empty, select and delete them directly.
The method you choose matters because Excel doesn't have a single "delete all blanks" button. What works for one type of blank creates problems for another. This guide walks you through each situation so you pick the right one the first time.
Key Takeaways
- Blank rows are easiest to remove by sorting your data to group them together, then selecting and deleting them all at once.
- Blank cells within a column can be removed with Find & Replace by searching for nothing (leave the Find field empty) and replacing with nothing, then deleting the shifted cells.
- Entire blank columns should be selected by clicking the column header, then deleted by right-clicking and choosing Delete.
- Always save a copy of your spreadsheet before deleting blanks, because the Undo command only works for your current session.
Removing blank rows from your data
Blank rows are the most common problem. They usually appear when you copy data from another source or delete content but leave the row structure behind. To remove them:
- Click any cell in your data range.
- Go to the Data menu and click Sort.
- In the Sort dialog, click Options (or look for an expand arrow).
- Check the box that says My data has headers if your first row contains column names. If not, leave it unchecked.
- Click OK, then OK again.
Excel will move all blank rows to the bottom of your data. Now select the first blank row by clicking its row number on the left side. Hold Shift and click the last row number to select all blank rows at once. Right-click and choose Delete Rows.
This method works because sorting groups identical values together — and a blank cell is treated as a value. The sort doesn't change your data, only its order. If you need to preserve the original order, write a number in a helper column before sorting (1, 2, 3, and so on), then sort by that column again after deleting blanks to restore the original sequence.
Removing blank cells within a column
Sometimes you have data in a column with empty cells scattered between entries. These are harder to spot and remove because they don't form complete blank rows. The Find & Replace method works here:
- Select the column that contains blanks by clicking the column header letter.
- Press Ctrl + H (or Cmd + H on Mac) to open Find & Replace.
- Leave the Find what field completely empty.
- Leave the Replace with field completely empty.
- Click Replace All.
This removes the blank cells but leaves the row structure in place — your data will shift up to fill the gaps. If you want to delete the now-empty rows that appear at the bottom, use the blank row method above.
If Find & Replace doesn't work (sometimes it doesn't recognize truly empty cells), try this instead: select the column, go to Data > Filter > AutoFilter, click the dropdown arrow in the column header, uncheck Blanks, and you'll see only the filled cells. Copy these cells, paste them into a new column, then delete the original column.
Deleting entire blank columns
If you have columns with no data at all, removing them cleans up your spreadsheet and makes it easier to work with. Click the column header letter to select the entire column. Right-click and choose Delete. Excel will remove the column and shift all columns to the right one position to the left.
If you have multiple blank columns next to each other, select them all at once by clicking the first column header, holding Shift, and clicking the last column header. Then right-click and delete them together. This is faster than deleting one at a time.
Using AutoFilter to hide and delete blanks selectively
Sometimes you don't want to delete all blanks — you want to see only the rows with data, or delete blanks only in certain columns. AutoFilter lets you do this:
- Click any cell in your data.
- Go to Data > Filter > AutoFilter.
- Click the dropdown arrow that appears in the column header.
- Uncheck Blanks to hide blank cells in that column.
- Now only rows with data in that column are visible.
The hidden rows are still there — they're just not displayed. If you select and delete rows while the filter is active, you delete only the visible rows. When you turn off the filter, the hidden rows reappear. This is useful when you want to delete blanks in one column but keep rows that have blanks in other columns.
What to do if deletion goes wrong
If you delete something by mistake, press Ctrl + Z (or Cmd + Z on Mac) immediately to undo. The Undo command works for your current session only — once you close the file, you can't undo deletions from before you closed it.
Before you delete any blanks, save your file with a different name (like "Spreadsheet_backup.xlsx"). This way, if something goes wrong, you have the original to go back to. After you've confirmed the deletion worked correctly, you can delete the backup file.
Common mistakes to avoid
The biggest mistake is selecting the wrong range before deleting. If you select your entire spreadsheet and delete blanks, you might remove rows you wanted to keep. Always click a cell in your data first, or select only the range you want to clean up.
Another mistake is confusing blank cells with cells that contain a space character. A cell with a single space looks empty but isn't — Find & Replace won't remove it. To find these, search for a single space in the Find field and leave Replace with empty. If you find any, you can replace them all at once.
Don't use the Delete key on a blank cell — that does nothing. Use the right-click menu and choose Delete to shift cells up, or use Find & Replace to remove blanks in bulk.
Frequently Asked Questions
Can I delete blanks from multiple columns at once?
Not in a single operation. If you select multiple columns and use Find & Replace, it will remove blanks from all of them, but the cells will shift up independently in each column. For most situations, it's safer to clean one column at a time so you can see what's happening.
What's the difference between a blank cell and a cell with a formula that returns nothing?
A truly blank cell contains nothing. A cell with a formula that returns nothing (like =IF(A1="","","text")) contains a formula — it just displays as empty. Find & Replace won't remove formula cells. To find these, search for the formula itself or use Go To Special to select cells with formulas.
Will sorting my data change the order of my rows?
Yes, sorting rearranges rows based on the column you sort by. If you need to preserve the original order, add a helper column with row numbers before sorting, then sort by that column again after deleting blanks to restore the original sequence.
Can I delete blanks in a filtered view without affecting hidden rows?
Yes. When you delete rows in a filtered view, only the visible rows are deleted. Hidden rows stay in place. This is useful if you want to remove blanks from only part of your data while keeping the rest untouched.
What if I accidentally deleted rows I needed?
Press Ctrl + Z (or Cmd + Z on Mac) immediately to undo the deletion. If you've already closed the file, the undo history is gone. This is why saving a backup copy before deleting is important — you can reopen the backup and try again.