Split names into columns - Numbers

Hi everyone


I hoping one of you Numbers Formula Geniuses (genii?) might be able to help me recover a big mistake I made.


I have a large spreadsheet in which there are:

FIRST NAME column which is blank

LAST NAME column which contains the Full Name


I have attached 2 screenshot of an example sheet, one "Before" and one "After".


I want to somehow "automate" splitting the LAST NAME into First and Last by moving the first word before the first {SPACE} to First Name column (and somehow removing the {SPACE}).


BEFORE:


AFTER:


Additionally, ideally, if there is a single-word entry, I'd like to leave a "-" (hyphen) in the Last Name column ... but this is far easier to fix manually so not necessary.


Is there a way? Or do I have a very long week ahead? 😰


Thank you very much in advance for your knowledge and help.


David

Mac mini

Posted on May 28, 2025 4:42 AM

Reply
2 replies
Sort By: 

May 28, 2025 5:22 AM in response to dsh77

It can be done but it may not be perfect and it will require a third (temporary) column for the last name. The idea is to split it at the first space character. Anything to the left is first name. Anything to the right is last name. The space character itself gets dropped. But names don't always follow that convention. If someone has a multi-word first name or uses their first and middle as their "first" name, you'll have to manually fix it.



B2 =IFERROR(TEXTBEFORE(C2," "),C2)

D2 =IFERROR(TEXTAFTER(C2,B2&" "),"-")

Fill down with both to complete the columns

Select columns B-D

Copy

Paste Formula Results (this is in the Edit menu) to convert the formulas to values

Review the results and manually fix any that need fixing

Delete your old column C


With the more recent version(s) of Numbers, you only need to enter a formula in B and D and have them "spill" into all the rows below. For that the formulas will be

B2 =IFERROR(TEXTBEFORE(C," "),C)

D2 =IFERROR(TEXTAFTER(C,B&" "),"-")

No need to fill down. All the other steps are the same.




Reply

Split names into columns - Numbers

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.