Extract the Last Word from a Cell in Excel
Question details
Extract the final word from a cell into an adjacent cell, regardless of whether its length is fixed or variable.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A worksheet contains text in column G, and the user wants the final word in column H.
- Observed behavior
- The adjacent cell should display the final word while the original text remains unchanged.
Identify the source cell and an empty adjacent cell for the result. The examples below use G2 as the source and H2 as the destination.
Extract a Last Word of Any Length
Use this formula when the final word can have a variable number of characters.
Click H2, or another empty cell next to your source text.
Type =TRIM(RIGHT(SUBSTITUTE(TRIM(G2)," ",REPT(" ",LEN(G2))),LEN(G2))) and press Enter. Replace G2 with your source cell if needed.
Drag the fill handle at the bottom-right corner of H2 down the column to extract words from additional rows.

Extract a Two-Character Final Word
Use RIGHT when every final word is exactly two characters long.
Extract the Last Word with WPS Spreadsheet
Open your workbook in WPS Spreadsheet and use the same formula to return the last word in an adjacent cell.
- 1. Open the workbook: Open WPS Spreadsheet and select Open to choose your Excel workbook.
- 2. Select an empty cell: Click H2 next to the source text in G2, or choose the corresponding empty cell in your sheet.
- 3. Enter the formula: Enter =TRIM(RIGHT(SUBSTITUTE(TRIM(G2)," ",REPT(" ",LEN(G2))),LEN(G2))) and press Enter.
- 4. Apply it to more rows: Drag the fill handle down from H2 to copy the formula to the remaining rows.

Frequently Asked Questions
How do I extract the last word if its length varies?
Enter =TRIM(RIGHT(SUBSTITUTE(TRIM(G2)," ",REPT(" ",LEN(G2))),LEN(G2))) in an empty cell such as H2. Replace G2 with the cell containing your text.
Does the formula remove the word from the original cell?
No. The formula displays the extracted word in the destination cell and leaves the source text unchanged.
What if the source cell has extra spaces?
The variable-length formula uses TRIM to handle leading, trailing, and repeated ordinary spaces. Other characters, such as nonbreaking spaces or tabs, may need to be replaced first.
How can I apply the formula to an entire list?
Enter the formula in the first destination cell, such as H2, then drag its fill handle down alongside the source cells.




