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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cell text manipulation

Status
Not open for further replies.

Joemaha

Technical User
Jul 19, 2004
7
0
0
US
If I have cells with input "FirstName,LastName" in the same cell, what is the best way to manipulate the text into a new cell with the input being "LastName,FirstName"? If possible, I would like to do this without using macros. Any ideas?
 
=RIGHT(A1,LEN(A1)-FIND(",",A1))&","&LEFT(A1,LEN(A1)-FIND(",",A1)-1)



[Blue]Blue[/Blue] [Dragon]

If I wasn't Blue, I would just be a Dragon...
 
Thanks Blue, got closer, but still not getting a usable output...
The formula worked on a few, but not that many.

Example
Jim,Wilson became Wilson,Jim,W

Any way to fix this??

Thanks in advance
 
Joemaha -

This worked for me:

Code:
=CONCATENATE(TRIM(RIGHT(A1,LEN(A1)-FIND(",",A1)-1)),", ",TRIM(LEFT(A1,LEN(A1)-(LEN(A1)-FIND(",",A1))-1)))


*cLFlaVA
----------------------------
A polar bear walks into a bar and says, "Can I have a ... beer?"
The bartender asks, "What's with the big pause?
 
Select the data, do Data / Text To Columns / Delimited / Tick the comma option, hit Next and Finish

Regards
Ken.................

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]

----------------------------------------------------------------------------
 
Thanks everyone,
I took some advice off Bluedragon's post and used the Left and Right commands while modifying the use of Find with the commas. Kind of a roundabout compared to some other solutions, but It's working for me. Thanks alot.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top