FormulaCraft

How to extract the last name in Excel and Google Sheets

Topic:Text manipulation
Excel & Google Sheets
=MID(A2,FIND(" ",A2)+1,LEN(A2))

Verified example

Computed by a real spreadsheet engine on the sample data below.

Full NameLast Name
Alice Smith
Bob Jones
Carol White
Dan Brown
Eve Black

=MID(A2,FIND(" ",A2)+1,LEN(A2))Smith

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

Step by step

  1. 1Ensure your names are in "First Last" format with a single space separator.
  2. 2In an empty column, enter =MID(A2,FIND(" ",A2)+1,LEN(A2)) to extract everything after the first space.
  3. 3Apply TRIM to the result if extra spaces may be present: =TRIM(MID(A2,FIND(" ",A2)+1,LEN(A2))).
  4. 4Copy the formula down to all rows.

Tips

Need it for your exact data?

Describe your columns in plain English and get the precise formula for your sheet, with the right Excel or Sheets syntax.

Frequently asked

What about names with two last names (hyphenated or spaced)?

The formula returns everything after the first space, so "Mary Van Der Berg" yields "Van Der Berg" automatically.

What if the cell contains only a first name with no space?

FIND returns #VALUE!. Protect with IFERROR: =IFERROR(MID(A2,FIND(" ",A2)+1,LEN(A2)),"").

More on Text manipulation

See all →

Formulas used

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: