Excel Formula to Extract Last Name from Full Name
Free formula generator
Open RIGHT formula generatorSplitting names in Excel is a common data cleaning task. Here are formulas for the most common name formats.
Format: "First Last" — Extract Last Name
=RIGHT(A2, LEN(A2)-FIND(" ",A2))
This finds the space, then extracts everything to the right of it.
Format: "First Middle Last" — Extract Last Name Only
=RIGHT(A2, LEN(A2)-FIND("*",SUBSTITUTE(A2," ","*",LEN(A2)-LEN(SUBSTITUTE(A2," ","")))))
This replaces the last space with a marker (*) and extracts everything after it. Works for any number of name parts.
Format: "Last, First" — Extract Last Name
=LEFT(A2, FIND(",",A2)-1)
Extract First Name Too
=LEFT(A2, FIND(" ",A2)-1)
Excel 365: Use TEXTSPLIT (Easiest Method)
=TEXTSPLIT(A2," ")
This splits the name into separate cells by space. For the last element, combine with INDEX:
=INDEX(TEXTSPLIT(A2," "),COUNTA(TEXTSPLIT(A2," ")))
Flash Fill (No Formula Needed)
Type the last name of the first entry in an adjacent column, then press Ctrl+E. Excel will auto-fill the pattern.
FAQ
How do I extract the last name from a full name in Excel?
=RIGHT(A2, LEN(A2)-FIND(" ",A2)) works for "First Last" format.
How do I split first and last name into separate columns?
Use Data → Text to Columns → Delimited → Space. Or use Flash Fill (Ctrl+E).
What if the name has a middle name?
Use the SUBSTITUTE formula above that finds the last space, or use TEXTSPLIT in Excel 365.
Related: Capitalize First Letter in Excel and Extract Text Between Characters.
📋 Related Formula Tools
Want to generate the formula directly? Try our free formula generators:
📬 Get Weekly Excel Tips
Join thousands of Excel users who receive our weekly formula tips, tricks, and productivity hacks.
Subscribe Free →📖 Continue Reading
How to Get First Word from Cell in Excel (3 Formulas Compared)
Learn 3 Excel formulas to extract the first word from a cell — LEFT+FIND for all versions, TEXTBEFORE for Excel 365. Step-by-step with examples.
How to Calculate Percentage Increase in Excel — Formula & Examples | SheetMaster
Master the Excel percentage increase formula in under 2 minutes. Step-by-step with real examples for sales growth, revenue tracking & YoY comparisons. Copy the formula, done.
Excel Formula to Find Duplicates in Two Columns (Step-by-Step)
Find duplicate values across two columns in Excel using COUNTIF, VLOOKUP, and conditional formatting. Includes formulas to highlight and extract duplicates.
Calculate Business Days Between Two Dates in Excel (NETWORKDAYS)
Use the NETWORKDAYS and NETWORKDAYS.INTL functions to calculate the number of business days between two dates in Excel. Includes examples and holiday handling.