Fix messy names with PROPER and TRIM
PremiumThe name in A2 has extra spaces and the wrong capitals. In B2, clean it up to "Maria Lopez". Put TRIM inside PROPER.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Name as typed | Name | ||||
| 2 | mARIA lOPEZ | |||||
| 3 | ||||||
| 4 | ||||||
| 5 | ||||||
| 6 | ||||||
| 7 | ||||||
| 8 |
Premium lesson
Unlock TRIM, PROPER and UPPER and every other lesson
This is a premium lesson. Premium lets you solve it and every other lesson, take the timed mock tests, and earn certificates you can share on LinkedIn.
Your first month for $9.50 $19
50% off your first month when you join today.
Then $19/month. Cancel any time, and get a full refund within 14 days if it isn't for you.
Why this works
TRIM(A2) removes the spaces at both ends and squeezes the three spaces in the middle down to one, giving "mARIA lOPEZ". PROPER then capitalizes the first letter of each word and makes the rest lowercase: "Maria Lopez".
Common mistake: Fixing the capitals and forgetting the spaces. The name looks almost right, but " Maria Lopez " won't match "Maria Lopez" in a lookup.
The answer
- B2
=PROPER(TRIM(A2))