Remove extra spaces with TRIM

Find the invisible spaces that break lookups and hide duplicates, and clean them with TRIM in a helper column.

Beginner · 9 min · 10 steps

In this lesson

  • =TRIM(A2) removes spaces at the start and end of a text, and turns runs of spaces between words into one.
  • Spot hidden spaces with =LEN(A2) (more characters than you see) or =A2=A3 (FALSE for two values that look the same).
  • Put TRIM in a helper column, fill it down, and point lookups and duplicate checks at the clean column.

Try a free lesson first

Why your formula broke when you copied it

Lock a cell with $ so a formula keeps working when you copy it down.

Beginner · 7 min · Free, with no sign-up

Do the free lesson on your computer.

Send yourself the link and open it on a laptop or desktop.

On your computer, go tolearnford.com/go/39MP

This lesson is in the full Google Sheets course

US$149 once

Tax included. New lessons are added as they're written.

Get the full course, US$149

30-day money-back guarantee if you've opened fewer than 10 paid lessons.

  • All 215 Google Sheets lessons open today, and every new one as it's written.
  • The Roadmap, Skills and all seven paths.
  • A cheat sheet for every lesson you finish.

Already have the course? Sign in

Skill
Text
Stage
Beginner
Path
Clean up messy data

Where it sits in Text 13 lessons

And 7 more, up to Pattern matching with regular expressions. See the whole skill

The steps

10 steps: 4 explanations, 5 Do this, 1 question, then Your turn.

Try a free lesson first

Why your formula broke when you copied it

Lock a cell with $ so a formula keeps working when you copy it down.

Beginner · 7 min · Free, with no sign-up

Do the free lesson on your computer.

Send yourself the link and open it on a laptop or desktop.

On your computer, go tolearnford.com/go/39MP