BBampaa

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 →
About 5–10 minutes · no sign-up needed

Example

Real customer lists look like this. Two functions tidy a name in one go:

=PROPER(TRIM(A2))

Typed into cell D2 of this sheet:

NameCityPhoneClean nameOutput
ada obilagos0803-555-1234
TUNDE BAKARE ABUJA0706-555-9876
grace ezeabuja0812-555-4433
Musa BelloKano0901-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

Try each one in your head first, then open the answer.

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&", "&B5

Learn 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 →
About 5–10 minutes · no sign-up needed