Remove extra spaces with TRIM
Step 1 of 3
Text pasted from other systems often comes with extra spaces: before, after or between words. The name in A2 looks almost right, but a lookup for "Anna Berg" will not find it.
Click Continue when you're ready.
Already know it? Type the formula straight into B2.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Name as imported | Clean name | ||||
| 2 | Anna Berg | |||||
| 3 | ||||||
| 4 | ||||||
| 5 | ||||||
| 6 | ||||||
| 7 | ||||||
| 8 |
Need help?
Why this works
TRIM removes every space before the first word and after the last one, and turns each run of spaces between words into a single space. " Anna Berg " becomes "Anna Berg", which now matches the same name typed by hand.
Common mistake: Fixing the spaces by hand. It works for one cell, but a pasted list of 500 names needs a formula you can fill down.
The answer
- B2
=TRIM(A2)
TRIM removes spaces at the start and end of a text and replaces runs of spaces between words with one space, for example =TRIM(A2).
One of them often has an extra space at the end. Clean the column with TRIM first.
+10 points