SUBSTITUTE, TEXTBEFORE and TEXTAFTER practice exercises
Replace characters inside a text, and split a text at a separator without counting positions yourself.
- 1Remove the dashes with SUBSTITUTEIn B2, use SUBSTITUTE to remove every dash from the phone number in A2. Replace "-" with an empty text, "".
- 2Take the first name with TEXTBEFOREPremiumIn B2, use TEXTBEFORE to get the text in A2 before the first space.
- 3Flip "Last, First" with TEXTAFTERPremiumIn B2, turn the name in A2 into "Anna Berg". Join TEXTAFTER and TEXTBEFORE around ", " with a space between them.
- 4Take the text between parenthesesPremiumIn B2, take the department between the parentheses in A2. Use TEXTAFTER to take what comes after "(", and TEXTBEFORE around it to stop at ")".