Unit 6 of 12
Working with text
Clean, join, and slice words.
Functions in this unit: PROPER, TRIM, UPPER, LOWER, LEFT, RIGHT, LEN, FIND
Key ideas
Join with &
=A2&" "&B2The & glues text together. Add spaces and punctuation in quotes.
Slice with LEFT, RIGHT, MID
=LEFT(A2,2)Grab characters from the start, the end, or the middle. LEN tells you the length.
Lesson 1: Cleaning text
Capitalize the name properly in B2.
A B 1 Raw name Clean 2 jordan lee 3 MARIA GARCIA 4 sam o'brien Hint: =PROPER(A2)
Show answer
=PROPER(A2)in B2. PROPER even handles O'Brien correctly.Remove the extra spaces from the name in B2.
A B 1 Raw name Clean 2 Jordan Lee 3 Maria Garcia 4 Sam O'Brien Hint: =TRIM(A2)
Show answer
=TRIM(A2)in B2. TRIM strips spaces at the ends and squeezes double spaces inside.What will B1 show?
A B 1 kc royals B1 contains
=UPPER(A1)Show answer
KC ROYALS. UPPER converts every letter to a capital.
Match each function to what it does
- TRIM
- Removes extra spaces
- PROPER
- Capitalizes each word
- UPPER
- ALL CAPS
- LOWER
- all lowercase
These names are messy in two ways. Clean both problems in B2 with one formula.
A B 1 Raw name Clean 2 jordan LEE 3 maria garcia 4 SAM o'brien Hint: Wrap one function inside the other: =PROPER(TRIM(A2))
Lesson 2: Joining text
Make a full name in C2 from First and Last, with a space between.
A B C 1 First Last Full name 2 Ava Chen 3 Ben Ortiz 4 Cara Diaz Hint: =A2&" "&B2
Show answer
=A2&" "&B2in C2. The " " in the middle is a space stored as text.Build "Last, First" for row 2
Show answer
=B2&", "&A2. Use & to join, never +. A plus sign tries to do math.What will A1 show?
A 1 A1 contains
="Q"&3Show answer
Q3. & turns the number into text and joins it.
What happens with ="Hi"+"There"?
- #VALUE! error
- HiThere
- Hi There
- 0
Show answer
#VALUE! error. + is for numbers. Use & to join text.
Build a company email in C2: first.last@acme.com in lowercase.
A B C 1 First Last Email 2 Ava Chen 3 Ben Ortiz 4 Cara Diaz Hint: =LOWER(A2&"."&B2)&"@acme.com"
Show answer
=LOWER(A2&"."&B2)&"@acme.com"in C2. Combining LOWER with & is how teams generate usernames in bulk.
Lesson 3: Slicing text
Pull the 2-letter location prefix from the code into B2.
A B 1 Code Location 2 KC-2041 3 NY-1187 4 LA-3302 Hint: =LEFT(A2,2)
Show answer
=LEFT(A2,2)in B2. LEFT grabs characters from the start.Pull the 4-digit number from the end of the code into B2.
A B 1 Code Number 2 KC-2041 3 NY-1187 4 LA-3302 Hint: =RIGHT(A2,4)
Show answer
=RIGHT(A2,4)in B2. RIGHT grabs characters from the end.What will B1 show?
A B 1 Excel B1 contains
=LEN(A1)Show answer
6. The trailing space counts as a character.
Get just the first name in B2. It is everything before the space.
A B 1 Full name First 2 Ava Chen 3 Benjamin Ortiz 4 Cara Diaz Hint: FIND(" ",A2) gives the space position. Take one less than that with LEFT.
What does =MID("KC-2041",4,2) return?
- 20
- -2
- C-
- 41
Show answer
20. Start at character 4 and take 2 characters.