Flip "Last, First" with TEXTAFTER
PremiumIn B2, turn the name in A2 into "Anna Berg". Join TEXTAFTER and TEXTBEFORE around ", " with a space between them.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Name in the HR export | Name | ||||
| 2 | Berg, Anna | |||||
| 3 | ||||||
| 4 | ||||||
| 5 | ||||||
| 6 | ||||||
| 7 | ||||||
| 8 |
Premium lesson
Unlock SUBSTITUTE, TEXTBEFORE and TEXTAFTER and every other lesson
This is a premium lesson. Premium lets you solve it and every other lesson, take the timed mock tests, and earn certificates you can share on LinkedIn.
Next with premium:Dates and DATEEDATE and EOMONTH
It comes up in this mock test: Excel test for admin jobs
Need help?
Why this works
TEXTAFTER(A2,", ") gives "Anna" and TEXTBEFORE(A2,", ") gives "Berg". Join them with &, the first name first and a space in the middle. Using ", " as the separator, not just ",", means neither part keeps the space.
Common mistake: Splitting at "," only. The first name then starts with a space, " Anna".
The answer
- B2
=TEXTAFTER(A2,", ")&" "&TEXTBEFORE(A2,", ")
=TEXTAFTER(A2,", ")&" "&TEXTBEFORE(A2,", ") takes the part after the comma, a space, then the part before it.