Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel: Breaking up words in a Cell 1

Status
Not open for further replies.

LewisReeder

IS-IT--Management
Jul 18, 2005
38
US
I used to know how to do this but I havent done it in years.

I have a column with peoples names and each cell looks something like this "Smith, John" (no quotations). I want it to look like "John Smith" but I'll take it if I can have the first and last name in separate cells. I just forget what the script is to cut it off after the comma. Can anyone help me out with this little predicament?

Any advice is much appreciated,
Lewis
 
As long as you just want to break it off at one comma:

=RIGHT(A1,LEN(A1)-FIND(",",A1)-1)&" "&LEFT(A1,FIND(",",A1)-1)

[Blue]Blue[/Blue] [Dragon]

If I wasn't Blue, I would just be a Dragon...
 
Thank you very much Blue Dragon, it worked like a charm!

Lewis
 
Also in the future, you could try this:

1. Select the column that contains the names.
2. Go to Data> Text to columns.
3. When the wizard opens, select "delimited" and click next.
4. Select Comma as your delimiter, and click next.
5. Under "data format" select text, click "Finish". Done!

I hope this helps!

-Marco
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top