It is very common to have a list of full names you want to split up: event registration, email lists, and even company rosters. In this article, we show you step-by-step how to split first and last name in Google Sheets using the text to columns tool, SPLIT function, string functions, and a popular add-on.
One of the shortest ways to do this task is by using Text to Columns, a built-in feature in Google Sheets that separates your text with a delimiter. A delimiter is something that separates two values. Thankfully, since first and last names are separated by spaces, this would be a perfect delimiter.
Note that by using this, your first names will occupy the first column and will remove the full names. It will also treat your headers the same way. Luckily, there are other methods in Google Sheets that we will cover below.
This function in Google Sheets performs the same technique to separate that the text to column uses. Given a certain delimiter, this function will divide your text in every instance thereof.
The Split function in Google Sheets is in the following form:
=SPLIT(text, delimiter, [split_by_each], [remove_empty_text])
Its main parts would be:
TEXT which is the full name,
DELIMITER which would be the space enclosed in quotation marks (“ “),
and two other optional arguments in brackets that are not necessary in dividing simple names.
To use this formula, simply follow this guide:
Here the cell reference is the name we want to split, cell A2, and our delimiter will be the space. Thus, we use =SPLIT(A2,” “).
Another powerful combination of functions in Google that can help you sort your names will be using the FIND, LEFT, RIGHT, and LEN Functions.
Let’s look at them all before using them together:
=LEFT(string, [number_of_characters])
=RIGHT(string, [number_of_characters])
String is a set of words or characters (reference the cells containing the full names).
Number_of_Characters is the count of characters from the left or right ends of our string. Since the number of letters in a first name or a last name vary per name, using these two alone will not be sufficient. This is why we use the FIND and LEN Function.
We will use FIND to search for the first space from the full names.
Follow the steps below to discover how to string these formulas in Google Sheets.
Our cell reference will be the cell containing the name. We subtract 1 to indicate the position excluding the space. This will return characters at the left before the space, our first names.
This works by subtracting the position of the first space to the number of characters. It then gives us all the characters to the right of our string.
Now we have our first and last names separated. However, some cases of names can be more complex with middle names, double-barreled surnames, suffixes, and more. Dealing with these types of names will not be as simple as splitting them where spaces are found. Thankfully, we have an Add-On on Google Sheets called Split Names that will help us with these types of cases. This is a paid subscription but there is a free trial and here's how to install and use it.
And those are the different ways to split the full names into first and last names in Google Sheets. Try the different methods to see which is best for your case use and good luck!
If you enjoyed this article, you might also like our article on how to split text to columns or our article on how to split columns in Google Sheets.
If you want to learn how to send emails when a new row is added in Google Sheets, we also suggest checking out our detailed guide.