What you will learn
- Remove extra spaces and fix capital letters
- Put one function inside another
How it works
TRIM removes extra spaces. PROPER fixes the capital letters. UPPER makes everything capitals. LEN counts the characters.
You can put one function inside another, like =PROPER(TRIM(A2)). The inside one goes first.
Formulas at a glance
=PROPER(TRIM(A2)) | trim, then capitalize |
=LEN(B2) | character count |
Example
Write the formula to clean up the name in A2: remove extra spaces and fix the capitals.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Raw name | Clean name | Length | Upper |
| 2 | maya chen | |||
| 3 | LUIS ORTEGA | |||
| 4 | priya natarajan | |||
| 5 | sam OKAFOR |
Click B2 and type =PROPER(TRIM(A2)), then press Enter.
The answer is Maya Chen.
When to use it
- Cleaning names typed in many styles
- Removing extra spaces before a lookup
- Checking the length of codes or phone numbers
Common mistakes
- Expecting TRIM to remove every spaceTRIM keeps one space between words.
- Putting the functions in the wrong orderThe inside function runs first: =PROPER(TRIM(A2)).
- Editing the original dataClean in a new column, then copy the values back if you need to.
Quick check
What does TRIM remove?
- All spaces
- Extra spaces
- Capital letters
- Numbers
Show the answer
B. Extra spaces It removes spaces at the start and end, and extra spaces between words.
Practice it on a real sheet
Reading is a start. Doing it is how it sticks. This lesson walks you through every click on a live spreadsheet and checks each answer.