Erasing blank cells in Excel usually means one of two things: deleting the blank cells themselves so the remaining data shifts up or left, or clearing the contents of cells that are blank (which does nothing) versus deleting entire rows or columns that contain blanks. The most common request is to remove the blank cells from a range so your data becomes contiguous. This guide covers both the quick way and the precise way, plus how to avoid the classic mistake of deleting whole rows when you only wanted to remove the empty cells.

What You'll Need

  • Microsoft Excel (2010 or later; the steps are the same in Excel for Microsoft 365, Excel 2021, 2019, 2016, and 2013).
  • A worksheet with a range of data that contains blank cells you want to remove.
  • A backup of your data (optional but recommended, especially if the data is important).

Step-by-Step: How to Erase Blank Cells (Delete Them and Shift Data)

  1. Select the range that contains the blank cells. For example, if your data is in A1:C20, click and drag from A1 to C20. If your data is a proper Excel table, select the data range (not the whole column).
  2. Open the Go To Special dialog. Press F5 (or Ctrl+G) on your keyboard. This opens the "Go To" dialog box. Click the Special... button in the bottom-left corner. (In some Excel versions, you can also go to the Home tab > Editing group > Find & Select > Go To Special.)
  3. Choose "Blanks". In the Go To Special dialog, select the Blanks radio button, then click OK. Excel will now select all the blank cells within your original range. You'll see them highlighted, and the first blank cell will be the active cell (usually shown as a white cell within the selection).
  4. Do NOT click anywhere yet. This is critical. If you click a cell or press an arrow key, you'll lose the selection. Now, right-click on any of the selected blank cells. From the context menu, choose Delete.... (Alternatively, you can go to the Home tab > Cells group > Delete > Delete Cells.)
  5. Choose the shift direction. A dialog box will appear asking "Delete" with options: "Shift cells left", "Shift cells up", "Delete entire row", "Delete entire column". For most cases, you want to Shift cells up or Shift cells left. Choose the one that matches your data layout. If your data is in a vertical list, choose "Shift cells up" to remove the blanks and move the data up. If your data is in a horizontal row, choose "Shift cells left". Click OK.
  6. Verify the result. The blank cells are gone, and the remaining data has shifted to fill the gaps. Check that your data still makes sense (e.g., if you had a column of names with some blanks, the names below the blanks have moved up).

Alternative method for entire rows or columns: If you want to delete entire rows that contain any blank cell (or entire columns), you can use the same Go To Special > Blanks selection, then right-click > Delete and choose "Entire row" or "Entire column". This is useful when you want to remove any record that has a missing value. However, be cautious: this deletes the entire row, not just the blank cell, so it will remove data that is in other columns of that row.

Step-by-Step: How to Clear Contents of Blank Cells (Rarely Needed)

Sometimes people say "erase blank cells" but they actually mean "clear the contents of cells that appear blank but might contain spaces or formulas that return empty strings." If you have cells that look blank but contain a space character (e.g., from imported data), you might want to remove those spaces. Here's how:

  1. Select the range.
  2. Press F5 > Special > Blanks > OK.
  3. Press the Delete key on your keyboard. This will clear the contents of those cells. However, note that this only works if the cells are truly empty (no formulas, no spaces). If they contain spaces, they are not considered blank by Excel. To remove spaces, you would need to use the TRIM function or Find & Replace.

Common Mistakes

  • Deleting entire rows when you only wanted to remove blank cells. This is the most frequent error. If you select blanks and then choose "Delete entire row", you'll lose all data in that row, not just the blank cell. Always choose "Shift cells up" or "Shift cells left" unless you specifically want to remove whole rows.
  • Clicking outside the selection after Go To Special. If you click any cell or press an arrow key, the selection of blank cells is lost, and you'll have to start over. Use the right-click method or the Delete button on the ribbon without clicking elsewhere.
  • Not selecting the correct range first. If you select entire columns (e.g., A:C), Go To Special > Blanks will select all blank cells in those columns, which could be thousands of cells. This can slow down Excel or cause you to delete more than intended. Always select just the data range.
  • Forgetting that blanks are not always truly blank. Cells with spaces, apostrophes, or formulas returning "" are not considered blank. Go To Special > Blanks will not select them. To find those, you might need to use a formula like =ISBLANK(A1) or use Find & Replace.

Tips

  • Use a helper column for complex deletions. If you need to delete rows based on multiple conditions (e.g., delete rows where column B is blank AND column C is not), it's safer to add a helper column with a formula like =IF(AND(B2="",C2<>""),"Delete","") and then filter on that column.
  • Sort your data before deleting blanks. If you want to move all blank cells to the bottom or top, you can sort the column that contains blanks. This will group the blanks together, making it easier to select and delete them in one go.
  • Use a table for dynamic data. If you convert your data to an Excel Table (Ctrl+T), you can filter out blank rows and then delete them. This is often easier for beginners.
  • Undo is your friend. If you make a mistake, press Ctrl+Z immediately. Excel's undo can revert the deletion.
  • Remember that deleting cells shifts data. If you have formulas that reference the shifted cells, they may update automatically, but check for any #REF! errors.

Troubleshooting

If the Go To Special > Blanks doesn't select anything: That means there are no truly blank cells in your range. Check for spaces or invisible characters. Use the TRIM function to clean data, or use Find & Replace (Ctrl+H) to replace a space with nothing (type a space in "Find what" and leave "Replace with" empty).

If you accidentally deleted data and Undo doesn't work: If you've closed the file or done many actions, you might not be able to undo. If you have a backup, restore it. Otherwise, you may need to re-enter the data. To avoid this in the future, always save a copy before performing deletions.

If the shift operation messes up your data: For example, if you have multiple columns and you shift cells up, the data in other columns may not align correctly. This happens when you have blanks in different rows across columns. In that case, consider deleting entire rows instead, or use a more advanced method like using a formula to pull non-blank values into a new range.

If Excel freezes or becomes slow: This can happen if you selected entire columns and Excel is trying to process thousands of blank cells. Press Esc to cancel, then reselect only the actual data range. If it's still slow, try copying the data to a new sheet and working there.

Frequently Asked Questions

Can I erase blank cells without shifting data?

No, deleting cells always shifts the remaining cells in some direction. If you don't want to shift data, you could instead filter out blank rows and copy the visible data to a new location, leaving the original intact.

How do I delete blank rows in Excel?

Select the range, press F5 > Special > Blanks, then right-click and choose "Delete" > "Entire row". This will delete all rows that contain at least one blank cell within the selected range. If you want to delete rows where a specific column is blank, filter that column for blanks and then delete the visible rows.

What if my blank cells contain spaces or formulas?

Go To Special > Blanks only selects truly empty cells. For cells with spaces, use =TRIM(A1) to clean them, or use Find & Replace to replace a space with nothing. For formulas that return "", you can use Find & Replace (Ctrl+H) and in "Find what" type "" (that's a double quote, double quote), and in "Replace with" leave it empty, then replace all. Be careful with that because it will also replace any empty string in formulas.

Why does my data shift incorrectly when I delete blanks?

If you have blanks in different rows across multiple columns, shifting cells up will cause misalignment. For example, if column A has a blank in row 2 and column B has a blank in row 3, shifting up will move B3 to B2, but A2 will be empty, so the rows no longer correspond. In such cases, you should delete entire rows instead, or first sort your data so that blanks are aligned.

Can I use a formula to remove blank cells?

Yes, you can use an array formula or the FILTER function (in Excel 365) to create a new range without blanks. For example, =FILTER(A1:A20, A1:A20<>"") will return only non-blank cells from A1:A20. This doesn't modify your original data but creates a new list.

Is there a way to automatically remove blank cells as I type?

Not directly, but you can use Excel's Table feature and then filter out blanks. Or you can use data validation to prevent blank entries. If you want to clean up after the fact, the Go To Special method is the fastest.