Lesson 10. Text functions: clean up names, remove spaces, join and split text
Use the file lesson10.xlsx, Exercises sheet.
Files: lesson10.xlsx · solutions: lesson10-solutions.xlsx.
In the exercises with a sheet, type the formula in the fx bar and click Check: the sheet works it out the way Excel does, with commas between the arguments (semicolons work too), and also tries it with other data, to see whether it still works when the data changes. In the other exercises, you work in Excel with the lesson's file and type the result here.
At the end of the page you'll find the lesson's Bonus challenge: one more exercise, whose answer isn't in the book. You check it only here.
Exercise 1
Show the answer
=PROPER(TRIM(B4)); C5 shows Oak Table.
Exercise 2
Show the answer
=LEN(B4) = 19, =LEN(C4) = 15: the formula removed 4 spaces, the 2 at the start and 2 of the 3 between "ergonomic" and "chair."
Exercise 3
Show the answer
=MID(A4,5,4) (here the category has 3 letters, so the year starts at character 5): the item from 2023 is the bookcase (BKC-2023-051).
Exercise 4
Show the answer
=C4&" ("&A4&")" or =CONCAT(C4," (",A4,")"); E8 shows Braided Rug (RUG-2025-120).
Bonus challenge
The answer isn't in the book: you check it only here.
Show the answer
=LEFT(A4,3)&RIGHT(A4,3), copied down to G9 (or =CONCAT(LEFT(A4,3),RIGHT(A4,3))). LEFT takes the 3 letters of the category, RIGHT takes the last 3 digits, and & joins them. The sofa, SOF-2024-033, becomes SOF033. Watch out for RIGHT(A4,4): it takes the hyphen too and gives SOF-033.