split first name and last name into 2 columns
I have first and last names in 1 column and would like to separate them into 2 columns
MacBook Pro 15″, macOS 12.7
I have first and last names in 1 column and would like to separate them into 2 columns
MacBook Pro 15″, macOS 12.7
If you only have first names and last names (no middle names) then a simple way is to use TEXTBEFORE and TEXTAFTER, something like this:
In B2 =TEXTBEFORE(A2," ")
In B3 =TEXTAFTER(A2," ")
There is also a TEXTBETWEEN function if you have middle names.
There are also ways using REGEX.EXTRACT but the above functions handle most cases.
SG
If you only have first names and last names (no middle names) then a simple way is to use TEXTBEFORE and TEXTAFTER, something like this:
In B2 =TEXTBEFORE(A2," ")
In B3 =TEXTAFTER(A2," ")
There is also a TEXTBETWEEN function if you have middle names.
There are also ways using REGEX.EXTRACT but the above functions handle most cases.
SG
Hi SG,
SGIII wrote:
In B2 =TEXTBEFORE(A2," ")
In B3 =TEXTAFTER(A2," ")
Just a thought, I think this is what you meant.
In B2 =TEXTBEFORE(A2," ")
In C2 =TEXTAFTER(A2," ")
No worries, mate!
Regards,
Ian.
Hi Ian,
Thanks for the correction!
SG
split first name and last name into 2 columns