FormulaCraft

How to extract the last word from a cell in Excel and Google Sheets

Topic:Text manipulation
Excel & Google Sheets
=TRIM(RIGHT(SUBSTITUTE(A2," ",REPT(" ",LEN(A2))),LEN(A2)))

Verified example

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

Full NameLast Word
John Doe
Jane Smith
Alice Johnson

=TRIM(RIGHT(SUBSTITUTE(A2," ",REPT(" ",LEN(A2))),LEN(A2)))Doe

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. 1Identify the cell containing the text from which you want to extract the last word.
  2. 2In an adjacent cell, enter the formula provided for Excel or Google Sheets.
  3. 3Press Enter to see the last word extracted from the original cell.

Tips

Working on a sheet you inherited? Run the Auditor on the whole file first — it flags every #REF!, #N/A, broken column pattern, and inconsistent formula in seconds, free, no signup.

Frequently asked

What if my text has multiple spaces between words?

The formula assumes single spaces. You may need to adjust it to handle multiple spaces.

Can this formula be used with other delimiters besides spaces?

Yes, replace the space character in the formula with your desired delimiter.

Does this work with special characters or punctuation?

Yes, as long as they are part of the last word or not used as delimiters.

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: