FormulaCraft

How to remove extra spaces in Excel and Google Sheets

Topic:Text manipulation
Excel & Google Sheets
=TRIM(A2)

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

Step by step

  1. 1In a new column, enter =TRIM(A2).
  2. 2Copy it down, then paste the result back as values if you want to replace the originals.
  3. 3Your text now has single spaces and no stray padding.

Tips

Need it for your exact data?

Describe your columns in plain English and get the precise formula for your sheet, with the right Excel or Sheets syntax.

Frequently asked

Does TRIM remove all spaces?

No — it keeps single spaces between words and removes only leading, trailing, and repeated spaces. To remove every space, use SUBSTITUTE(A2, " ", "").

More on Text manipulation

See all →

Formulas used

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: