Home » Questions » Computers [ Ask a new question ]

How do you split a name to get first name and last name?

How do you split a name to get first name and last name?

I have a column which contains a list of names, I want two other columns to contain functions which extract the first and last name. So far I have this

Asked by: Guest | Views: 95
Total answers/comments: 5
Guest [Entry]

"There's no foolproof way to do it, even ignoring titles and suffixes and stuff. Consider the following two names:

Edward Van Halen
David Lee Roth

The last names are ""Van Halen"" and ""Roth"", but there's no algorithmic way to tell the difference."
Guest [Entry]

"Also try to think about different cultures.

Just one example from Dutch: full name ""Johannes Ernestus Maria van den Brink"" splits up into first name ""Johannes"", middle names ""Ernestus Maria"", last name ""van den Brink"" (which should sort under B!).

Best solution (as in only 100% working) is to have separate name fields and an import method that lets the user enter the right pieces in the right fields.

So... good luck..."
Guest [Entry]

"Another option is to split up the name column into logical parts.

Say something like Salutation, First name, and Last name. That way you can build a name from the three columns, optionally working with the Salutation. If you wanted, throw in a Middle initial as well.

In this particular case, it's easier to build from parts than it is to try and deconstruct."
"Another option is to split up the name column into logical parts.

Say something like Salutation, First name, and Last name. That way you can build a name from the three columns, optionally working with the Salutation. If you wanted, throw in a Middle initial as well.

In this particular case, it's easier to build from parts than it is to try and deconstruct."
Guest [Entry]

"Microsoft Outlook has a pretty good algorithm for this. You can automate Outlook, but there is a definite performance hit.

http://www.dailydoseofexcel.com/archives/2004/11/11/parse-names-with-outlook/"
Guest [Entry]

"I had the same problem. No matter how many names you have for a person you can have them in separate fields very easily. I copied all the names from excel to notepad. Then I imported that text file into excel and while importing i selected the option delimited and then i selected the space delimited.

In order to have better results you can clean data by removing initials e.g
faisal s. tahir
change it to faisal tahir.

Now when you import the text file into excel as space delimited then it will automatically put all names (first, second, third, fourth, fifth) into different columns."