Names

How to Split Full Names into First and Last Name in Excel

By the DecodingPro teamUpdated 4 min read

Quick answer

For a clean list, type the first name next to the first row and press Ctrl+E (Flash Fill), or select the column and use Data, Text to Columns with a space as the delimiter. For a formula, use =LEFT(A2,FIND(" ",A2)-1) for the first name and =TRIM(MID(A2,FIND(" ",A2),LEN(A2))) for the rest. Check the result for names with more than two parts: simple splits get those wrong.

Names look easy until you split thousands of them. "John Smith" splits cleanly, but "Mary Ann O'Brien", "Dr. Ravi Kumar", "Maria de la Cruz" and "Li" do not. This guide covers the three quick methods, what each one gets wrong, and how to check your result.

Method 1: Flash Fill (fastest for small lists)

  1. Put the full names in column A. In B2, type the first name exactly as it should appear for A2.
  2. In B3, start typing the next first name. Excel shows a grey preview of the pattern.
  3. Press Enter to accept it, or press Ctrl+E on B3 to fill the whole column.

Flash Fill guesses from your examples, so look at every unusual row. It does not update if the source names change later.

Method 2: Text to Columns (no formulas)

  1. Select the full-name column.
  2. Choose Data, then Text to Columns, then Delimited, then Next.
  3. Tick Space, untick the others, and pick a destination column so you do not overwrite the originals.

A name with three words becomes three columns. That is correct for "Mary Ann Smith" and wrong for "Maria de la Cruz", where the last name is three words.

Method 3: formulas (updates when the names change)

First name (everything before the first space):

=IFERROR(LEFT(A2,FIND(" ",A2)-1),A2)

Last name (everything after the last space), works in every version of Excel:

=TRIM(RIGHT(SUBSTITUTE(A2," ",REPT(" ",100)),100))

Everything after the first space (the middle and last names together):

=IFERROR(TRIM(MID(A2,FIND(" ",A2)+1,LEN(A2))),"")

In Microsoft 365 you can also use =TEXTSPLIT(A2," "), which spills each word into its own cell.

The names that break simple splits

NameProblemWhat to do
Mary Ann SmithIs "Mary Ann" the first name?Decide a rule: first word is first name, last word is last name
Maria de la CruzThe last name has three wordsReview by hand, or keep the whole tail as the last name
Dr. Ravi Kumar, Mr John SmithThe title lands in the first-name columnRemove titles first with Find and Replace
John Smith Jr.The suffix becomes the last nameMove suffixes into their own column
MadonnaOne word, no spaceThe IFERROR in the formulas above keeps it
Smith, JohnSurname first, comma-separatedSplit on the comma instead of the space

Warning: no formula can know a person's name. If the split matters (letters, invoices, legal documents), review every row that does not have exactly two words.

Fix the capitals afterwards

Names typed in capitals or lowercase are common in exports. =PROPER(A2) capitalises each word, and it handles apostrophes well (o'brien becomes O'Brien). It does not know about McDonald, van der Berg or DeShawn, which it turns into Mcdonald, Van Der Berg and Deshawn. Check those by eye.

When there are too many rows to review by eye

DecodingPro tidies capitals and spacing across a whole file and flags names it is not sure about instead of rewriting them.

Try it on your own file

You start with 100 free credits. Every change is logged, and anything unclear is flagged, never guessed.

Fix a spreadsheet

Questions people ask

Why does Flash Fill not appear?

Flash Fill needs Excel 2013 or later, and it must be on under File, Options, Advanced, "Automatically Flash Fill". It also only triggers when the pattern is clear from the cells next to the column.

Can I split names in a CSV without opening Excel?

Yes. Any spreadsheet tool can do it, and so can a short script, but the same edge cases apply: titles, suffixes and multi-word last names need a rule.

How do I join first and last names back together?

Use =B2&" "&C2, or =TEXTJOIN(" ",TRUE,B2:C2) which skips empty cells.

Keep reading

01Excel data cleaningHow to Clean Messy Excel Data: A Step-by-Step GuideThe fixed order that stops one fix from undoing another, with the formulas for every step.10 min read02Text and numbersHow to Keep Leading Zeros in Excel and CSV (ZIP Codes, IDs)Why Excel turns 02134 into 2134, how to get the zeros back, and how to stop it happening when you open a CSV.5 min read03CSV and importsHow to Clean a CSV File Before Importing It Into a CRMSeven fixes that prevent duplicate contacts, rejected rows and scrambled characters, and the 10-row test to run first.4 min read04DatesHow to Fix Dates in Excel and CSV Files (Mixed Formats)Text dates, day-month swaps, two-digit years and the one rule that makes dates safe to share.8 min read05Phone numbersHow to Fix Phone Numbers in Excel: Format and Country CodesLeading zeros, 9.19E+11, country codes and the international format that every system accepts.6 min read06DuplicatesHow to Remove Duplicates in Excel Without Losing DataExact, near and partial duplicates: decide what counts, mark before you delete, keep the best record.6 min read07DuplicatesHow to Find and Highlight Duplicates in ExcelFind repeats safely first: highlight them, count them, keep the first one, and spot the near-duplicates Excel does not see.3 min read08NamesHow to Standardize Names in Excel: Proper Case and ExceptionsWhat PROPER gets wrong, how to protect names that are already right, and how to flip "Smith, John" into "John Smith".4 min read09Email addressesHow to Fix Email Typos in Excel: gmial.com, .con and Missing @The typos that make campaigns bounce, and the formulas and checks that fix them without guessing.4 min read10Email addressesHow to Clean an Email List Before You Send a CampaignA five-step routine that removes the avoidable bounces from a list without deleting anyone you should keep.3 min read12Text cleanupHow to Remove Extra Spaces in Excel (TRIM, CLEAN and Non-Breaking Spaces)Why TRIM sometimes does nothing, and the one formula that removes every kind of stray space.3 min read13Text cleanupHow to Remove Special Characters and Line Breaks in ExcelThe characters you cannot see, the smart quotes you can, and the exact formula or shortcut that removes each one.4 min read14NumbersHow to Convert Text to Numbers in Excel (Numbers Stored as Text)Why sums show zero, why numbers sit on the left, and four ways to turn text back into real numbers.3 min read15Excel data cleaningHow to Clean Data with Power Query in Excel (Step by Step)Record your cleaning steps once and replay them on every new file, without formulas and without touching the original data.4 min read16Comparing dataHow to Compare Two Lists in Excel and Find What Is MissingFind the names, IDs or emails that are in one list and not the other, with formulas that scale.3 min read17CSV and importsFix Garbled Characters and Broken CSV Imports (UTF-8)UTF-8, delimiters, leading zeros, quotes and a checklist that makes a file safe to import.7 min read18Data entryData Entry Accuracy: How to Check, Measure and Improve ItWhat the research says about error rates, why proofreading fails and the checks that actually work.9 min read