Google Sheets Split Names into First and Last Name
In this article
To split names into first and last in Google Sheets, the fastest method is to highlight your data, go to the Data menu, and select Split text to columns. This instantly divides a single cell into multiple cells based on a delimiter, such as a space. Alternatively, you can use the SPLIT function for a dynamic solution that updates automatically when you change the original name.
What You'll Need
- A Google account with access to Google Sheets.
- A spreadsheet containing a list of full names in a single column.
- Empty columns to the right of your name list to prevent existing data from being overwritten.
Step-by-Step
Depending on whether you want a permanent change to your data or a formula-based approach that stays linked to the original source, choose one of the following two methods. Note that menu labels may differ slightly depending on your browser version or regional settings.
Method 1: Using the Split Text to Columns Tool
This is the best method for one-time cleanup of a static list. It physically moves the data into separate cells.
- Open your Google Sheet and locate the column containing the full names.
- Click the column letter (e.g., Column A) to highlight all the names in that list. If you only want to split a specific range, click and drag to select those specific cells.
- Click on the Data menu in the top navigation bar.
- Select Split text to columns from the dropdown menu.
- A small floating menu labeled "Separator" will appear near the bottom of your selection. By default, it is often set to "Detect automatically." Click this dropdown and manually select Space.
- Google Sheets will immediately shift the last names (and any middle names) into the columns to the right.
Method 2: Using the SPLIT Function
Use this method if you want to keep your original "Full Name" column intact while creating separate "First Name" and "Last Name" columns elsewhere. This is ideal for templates where you will be adding more names later.
- Click on the empty cell where you want the first name to appear (for example, cell B2, if the full name is in A2).
- Type the following formula:
=SPLIT(A2, " "). - Press Enter. The first name will appear in cell B2 and the last name will automatically spill over into cell C2.
- To apply this to the rest of your list, click the small blue square (fill handle) at the bottom-right corner of cell B2 and drag it down to the bottom of your data set.
Method 3: Using ArrayFormula for Large Datasets
If you have thousands of rows, dragging a formula down is inefficient. You can use an ArrayFormula to process the entire column at once.
- Clear all cells in the columns where you want the split names to go.
- In the top cell of your first name column (e.g., B2), enter:
=ARRAYFORMULA(SPLIT(A2:A, " ")). - Press Enter. This single formula will automatically split every name in column A from row 2 downwards.
Common Mistakes
Splitting names seems straightforward, but data inconsistency often leads to errors. Here are the most frequent pitfalls to avoid:
- Overwriting Existing Data: When using the "Split text to columns" tool, Google Sheets does not ask for confirmation before overwriting data in the columns to the right. If you have important data in Column B and you split Column A, the data in Column B will be deleted and replaced by the last names. Always insert blank columns to the right before splitting.
- Ignoring Middle Names: Many users assume a name only has two parts. If a user enters "John Quincy Adams," the split tool will create three columns instead of two. This can shift your entire spreadsheet layout and misalign your headers.
- Trailing Spaces: Sometimes names are entered with a space at the end (e.g., "Jane Doe "). This can cause the split tool to create an extra, empty column at the end of the name, which can mess up subsequent data sorting or filtering.
- Assuming All Names Follow the Same Format: Some names are entered as "Last, First". If you split by space, you will get the last name and the first name, but the comma will remain attached to the last name.
Tips
To make your data cleaner and your workflow faster, consider these advanced techniques:
- The TRIM Function: To fix the "trailing space" issue mentioned above, wrap your data in a TRIM function. For example, use
=SPLIT(TRIM(A2), " "). This removes all leading and trailing spaces and ensures only single spaces exist between words. - Handling "Last, First" Formats: If your data is formatted with commas, change the delimiter in the Split tool from "Space" to "Comma". If using the formula, use
=SPLIT(A2, ", ")to split by the comma and the following space simultaneously. - Converting Formulas to Values: If you used the SPLIT formula but no longer need the original full name column, you cannot simply delete Column A, or your formulas will break (showing a #REF! error). Instead, highlight the split names, copy them (Ctrl+C), right-click the same area, and select Paste special > Values only. You can then safely delete the original column.
- Using Proper Case: If your names are in ALL CAPS or all lowercase, wrap your split formula in the PROPER function:
=PROPER(SPLIT(A2, " ")). This ensures the first letter of each name is capitalized.
Troubleshooting
If the split process does not go as planned, follow these steps to identify and fix the issue:
Problem: The names didn't split at all.
Check your delimiter. If you selected "Space" but the names are separated by tabs or commas, nothing will happen. Try setting the separator to "Detect automatically" or check the actual character separating the names.
Problem: I see a #VALUE! or #REF! error.
This usually happens with the SPLIT formula. A #REF! error occurs if there is already data in the cell where the last name is trying to "spill" into. Clear the cells to the right of your formula to make room for the resulting data.
Problem: Some names split into three or four columns.
This happens with people who have middle names or multi-part last names (e.g., "Van Buren"). To fix this, you may need to manually clean those specific rows or use a more complex formula involving REGEXEXTRACT to isolate only the first word and everything else after the first space.
Problem: The comma is still there.
If you split "Smith, John" by space, you get "Smith," and "John". To fix this, use the Find and Replace tool (Ctrl+H) to find all commas and replace them with nothing before you perform the split.
Frequently Asked Questions
Can I split names and keep the original column?
Yes. To do this, use the SPLIT formula in a new column rather than the "Split text to columns" tool. The tool modifies the original data, while the formula creates a copy of the data in a new format.
How do I handle names with middle initials?
The standard split tool will put the middle initial in its own column. If you want the middle initial to stay with the first name, you will need to manually merge those two columns or use a custom script.
Does this work on the Google Sheets mobile app?
The "Split text to columns" menu is generally not available in the mobile app. However, you can still type the =SPLIT() formula into a cell using the mobile keyboard, and it will work exactly as it does on the desktop version.
What if I have names in different languages with different separators?
The SPLIT function and the Split tool allow you to specify any character as a delimiter. If your data uses a semicolon or a pipe (|), simply enter that character in the separator settings or the formula.
Can I split names based on a specific word?
The SPLIT function works based on characters, not words. If you need to split based on a specific word, you would need to use a combination of FIND and MID functions or a Regular Expression (REGEX) formula.