XL: How to Reverse the Order of Words in a Text String

Article translations Article translations
Article ID: 75513 - View products that this article applies to.
This article was previously published under Q75513
Expand all | Collapse all

SUMMARY

This article explains how to reverse the order of words in a comma-separated text string by using the FIND, LEFT, LEN, and RIGHT functions in Excel.

MORE INFORMATION

Suppose that there are two words separated by a comma in cell A1. A typical example is "LastName, FirstName". The following formula reverses the order of the two words and eliminates the comma:
=RIGHT(A1,(LEN(A1)-(FIND(",",A1)+1)))&" "&LEFT(A1,(FIND(",",A1)-1))
The formula searches for a comma and takes the text that falls to the left of the comma; it then concatenates that text to the end of the text that falls to the right of the comma. If A1 contains the text string "Jones, Bill", and you type the formula in cell B1, the text string "Bill Jones" is returned.

Properties

Article ID: 75513 - Last Review: September 19, 2011 - Revision: 3.0
APPLIES TO
  • Microsoft Excel 2000 Standard Edition
  • Microsoft Excel 97 Standard Edition
  • Microsoft Excel 95 Standard Edition
Keywords: 
kbhowto KB75513

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com