Lessons › Excel & Google Sheets
Excel & Google Sheets lesson
Cleaning text
TRIM removes the extra spaces, then PROPER capitalises each word: Ada Obi.
Try this lesson free →Example
Real customer lists look like this. Two functions tidy a name in one go:
=PROPER(TRIM(A2))| Name | City | Phone | Clean name | Output |
|---|---|---|---|---|
| ada obi | lagos | 0803-555-1234 | ||
| TUNDE BAKARE | ABUJA | 0706-555-9876 | ||
| grace eze | abuja | 0812-555-4433 | ||
| Musa Bello | Kano | 0901-555-2211 |
Key points
TRIMRemoves extra spaces at the start, at the end and in between.
PROPERCapitalises each word. UPPER and LOWER change everything.
&Joins text together: A5&", "&B5 gives Musa Bello, Kano.
LEFT and RIGHT take characters from either end: =LEFT(C2,4) gives 0803.
Practice
1. In D3, remove the extra spaces from Tunde's name.
=TRIM(A3)2. In E2, take the first 4 digits of Ada's phone number.
=LEFT(C2,4)3. In D3, tidy Tunde's name: remove the spaces and fix the capitals.
=PROPER(TRIM(A3))4. In D4, tidy Grace's name the same way.
=PROPER(TRIM(A4))5. In E5, join Musa's name and city so it reads: Musa Bello, Kano
=A5&", "&B5Learn it by doing. This lesson is a short hands-on level on Bampaa: see it work, then build and write it yourself, with instant feedback.
Try this lesson free →