Space Remover

The best online text space remover to clean and format text instantly.

📊Microsoft Excel

The Best Ways to Remove Blank Spaces in Excel

6 min read

Master Excel data cleaning with TRIM, SUBSTITUTE, and filtering techniques to eliminate unwanted spaces and improve accuracy.

Working in Excel becomes frustrating when your data contains unwanted blank spaces. These spaces can affect formulas, sorting, filtering, and overall data accuracy. If you're wondering how to remove blank spaces in Excel, this guide will show you the simplest and fastest methods you can use — even if you're a beginner.

1. Remove Leading and Trailing Spaces

Sometimes Excel cells contain spaces before or after the text. These are not visible, but they break formulas like VLOOKUP or MATCH.

Use the TRIM Function

  1. Select an empty cell.
  2. Type: =TRIM(A1)
  3. Press Enter.
  4. Drag the fill handle down to apply it to the full column.

The TRIM function removes:

  • Extra spaces
  • Leading spaces
  • Trailing spaces

Then, copy → paste as values to replace the original data.

2. Remove All Extra Spaces Inside Text

TRIM only removes leading/trailing spaces and reduces multiple spaces to one. If you want to remove all spaces entirely, use:

SUBSTITUTE Function

=SUBSTITUTE(A1, " ", "")

This deletes every space, useful for:

  • Phone numbers
  • IDs
  • Codes
  • URLs

3. Remove Blank Rows in Excel

Sometimes blank rows interrupt your dataset. To clean them:

Method: Filter and Delete

  1. Select the entire sheet or column.
  2. Go to DataFilter.
  3. Click the filter arrow.
  4. Choose Blanks.
  5. Select all blank rows → Right-click → Delete Rows.
  6. Remove the filter.

Your data becomes clean instantly.

4. Remove Hidden Spaces Causing Issues

Excel sometimes contains invisible characters like line breaks or non-breaking spaces.

Clean Using CLEAN + TRIM

=TRIM(CLEAN(A1))

This removes:

  • Line breaks
  • Hidden characters
  • Extra spacing

Perfect for messy, imported datasets.

5. Remove Blank Spaces Using Find & Replace

For quick cleaning:

  1. Press Ctrl + H.
  2. In Find what, type one space.
  3. In Replace with, leave it empty.
  4. Click Replace All.

This removes every visible space instantly.

Final Thoughts

Knowing how to remove blank spaces in Excel helps you clean data faster and avoid formula errors. Whether you're removing empty rows, hidden characters, or unwanted spacing, Excel provides easy tools to fix everything. With TRIM, SUBSTITUTE, CLEAN, and filtering, your dataset can be polished in just a few clicks.

Try Space Remover Now

Clean your text instantly with our free online space remover tool. Remove extra spaces, white space, and format your content in seconds.

Start Using Space Remover