Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

How to Get Rid of Blank Cells in Excel Fast

· 5 min read · Home Tech

In this article
  1. What You’ll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Blank cells in Excel can disrupt formulas, sorting, filtering, and data analysis—especially when they contain invisible spaces or line breaks that make cells appear blank but are not truly empty. Removing them ensures accurate results and clean datasets. You’ll need an Excel file with blank cells and basic familiarity with Excel’s interface; no add-ins or special tools required.

What You’ll Need

  • A Microsoft Excel file (Excel for Microsoft 365, Excel 2021, Excel 2019, or newer)
  • Excel installed on Windows or Mac (steps are nearly identical across platforms)
  • No internet connection or additional software needed

Step-by-Step

  1. Select the range or entire sheet:
    • Click the triangle at the top-left corner of the worksheet (above row 1, left of column A) to select all cells, OR
    • Highlight the specific range where blank cells need removal (e.g., A1:D100) by clicking and dragging.
  2. Open the Go To Special dialog:
    • Press F5 (Windows) or Command + G (Mac) to open the Go To dialog box.
    • Click the Special… button (bottom-left of the dialog).
  3. Select blanks:
    • In the Go To Special dialog, check Blanks (under Selection).
    • Click OK. Excel will highlight all truly blank cells—including those that look empty but may contain spaces or line breaks (see Troubleshooting).
  4. Decide how to handle the blanks:
    • To delete the cells entirely (shifting cells left or up):
      • With blanks still selected, go to the Home tab > Cells group > Delete > Delete Cells….
      • Choose either Shift cells left or Shift cells up depending on your layout (usually Shift cells up for vertical data).
      • Click OK.
    • To replace blanks with nothing (for cells that appear blank but contain spaces):
      • Press Ctrl + H (Windows) or Command + H (Mac) to open Find and Replace.
      • Leave the Find what box empty.
      • Press Spacebar once in the Find what box (to target cells with only spaces).
      • Leave Replace with empty.
      • Click Options > check Match entire cell contents > click Replace All.
      • Repeat this step, but now leave the Find what box empty and click Replace All to remove truly blank cells (optional—see Tips).
  5. Verify results:
    • Re-run the Go To Special > Blanks check: if no cells are selected, blanks are gone.
    • Sort your data to confirm no unexpected gaps or misalignments occurred.

Common Mistakes

  • Using Delete Sheet Rows instead of Delete Cells: Deleting entire rows shifts data vertically and may skip rows or break relationships between columns. Always choose Shift cells left or up to preserve row alignment.
  • Assuming all empty-looking cells are blank: Cells with spaces, non-breaking spaces (CHAR(160)), or line breaks (CHAR(10)) appear blank but aren’t selected by Go To Special > Blanks. Use =ISBLANK(A1) to test—returns FALSE if hidden characters exist.
  • Not unmerging cells first: Merged cells can cause Go To Special to miss blanks or behave unexpectedly. Unmerge (Home > Merge & Center > Unmerge Cells) before proceeding.
  • Deleting blanks without copying first: Once cells are deleted, the action can’t be undone with standard Undo (Ctrl+Z) if you’ve made additional edits. Always save a backup or work on a copy.

Tips

  • Use FILTER to isolate blanks first: Apply a filter to your data, uncheck all except (Blanks) in the column header, and visually review before deleting. This prevents accidental deletion of valid data.
  • Use formulas to clean before deletion: In a helper column, use =TRIM(SUBSTITUTE(A1,CHAR(160),"")) to remove non-breaking spaces and extra spaces, then copy-paste values before removing blanks.
  • For large datasets, use Power Query: Go to Data > Get Data > From Table/Range, then in Power Query Editor, right-click the column header > Remove Rows > Remove Blank Rows. Load back to Excel.
  • Preserve formatting: When deleting cells, choose Shift cells up to keep column widths and row heights intact.
  • Test one column at a time: Especially in wide tables, blank removal can misalign data if columns have blanks in different rows. Clean one column, verify, then move to the next.

Troubleshooting

  • Blanks still appear after deletion:
    • Check for hidden characters: use =CODE(A1) on a suspect cell. If it returns 160 (non-breaking space) or 10 (line break), use =SUBSTITUTE(A1,CHAR(160),"") or =CLEAN(A1) to strip them.
    • Re-run Find and Replace with Match entire cell contents unchecked, searching for " " (space) and replacing with nothing.
  • Excel won’t delete cells (error: “You can’t do that on a merged cell”):
    • Unmerge all cells in the range: select the area > Home > Merge & Center > Unmerge Cells.
    • Repeat the Go To Special > Blanks process.
  • Data shifts incorrectly after deletion:
    • Ensure you selected Shift cells up (not left) for vertical data. Horizontal layouts (e.g., time-series across columns) may need Shift cells left.
    • If using Find and Replace, verify no non-blank cells were affected—double-check with =LEN(A1)>0 to confirm cells still contain data.
  • Blanks reappear after sorting:
    • Blanks may have been replaced with spaces or zeros. Use Go To Special > Constants to find text/numbers and correct them.
    • Sort with Sort On set to Values (not Cell Color) and ensure My data has headers is checked if applicable.

Frequently Asked Questions

Can I remove blank rows instead of individual blank cells?

Yes. Select any cell in your data > go to Data > Sort & Filter > Filter > click the dropdown in a column > uncheck (Blanks) > copy visible rows to a new sheet > delete original. Or use Power Query’s Remove Blank Rows feature.

Will deleting blank cells break my formulas?

Possibly. If formulas reference specific rows/columns (e.g., =SUM(A1:A100)), deleting cells may shift ranges and exclude data. Use structured references (Excel Tables: Ctrl+T) or dynamic arrays (=FILTER()) for robust formulas.

How do I remove blanks only in one column?

Select just that column (click the column header letter) > follow steps 2–4 above. Use Go To Special > Blanks > Delete > Shift cells up to avoid shifting adjacent columns.

Why do some blanks remain after using TRIM and CLEAN?

TRIM removes extra spaces but leaves single spaces; CLEAN removes non-printable characters (like 1–31). If blanks persist, check for Unicode spaces (e.g., CHAR(8239), the narrow non-breaking space). Replace with =SUBSTITUTE(A1,CHAR(8239),"").

Can I undo this if I make a mistake?

Yes—if you haven’t closed Excel or made other edits, press Ctrl+Z immediately. If you’ve already saved, restore from a previous version of the file (right-click the .xlsx file > Properties > Previous Versions on Windows).

Does this work in Excel Online (browser version)?

Yes, but Go To Special isn’t available. Use Filter to isolate blanks, then manually delete rows or use Find and Replace on the filtered column. Power Query is also available in Excel Online for bulk cleaning.