Extract the Last Name from a Full Name
A column holds full names like "Ana Torres" and you need just the last names — to sort a roster alphabetically, match against HR records, or fill a separate surname field.
Excel & Google Sheets
How it works
The universal version works everywhere: FIND locates the first space, and MID grabs everything starting one character after it — the 100 is just "plenty of characters," so the rest of the name comes through. In Excel 365, TEXTAFTER(A2," ") reads more naturally and does the same thing. Google Sheets' REGEXEXTRACT(A2,"\S+$") behaves slightly differently: it grabs only the final word. That matters for multi-word surnames — "Ana de la Cruz" gives "de la Cruz" with MID or TEXTAFTER, but only "Cruz" with the regex. Pick the behavior that matches your data.
When to use it
Use this to sort contact lists by surname, split imported names into separate columns, or match people against a system that stores last names on their own. Pair it with extract-first-name to fully split a name column.
Common mistakes
Did this formula help?
Engine-verified against the sample data aboveLast reviewed 2026-07-08