We help IT Professionals succeed at work.

How Can I switch string

fb1990
fb1990 asked
on
Hello EE,

Can someone please help me with an excel formula to remove comma and switch the string before the commas to the end of the string? I have the following example:

III, Wallace James
Janet Rhodes,
Adu, Mary Ann

Should be

Wallace James III
Janet Rhodes
Mary Ann Adu

Thanks in advance for your help
Comment
Watch Question

Excel & VBA Expert
Most Valuable Expert 2018
Awarded 2015
Commented:
Assuming your string is in A1 then try this.....
In B1
=TRIM(RIGHT(A1,LEN(A1)-FIND(",",A1))&" "&REPLACE(A1,FIND(",",A1),255,""))

Open in new window


Edit: Or this after including the error handling.
=IFERROR(TRIM(RIGHT(A1,LEN(A1)-FIND(",",A1))&" "&REPLACE(A1,FIND(",",A1),255,"")),A1)

Open in new window

Author

Commented:
Thank you very much Sir.  Worked like a charm!
Subodh Tiwari (Neeraj)Excel & VBA Expert
Most Valuable Expert 2018
Awarded 2015

Commented:
You're welcome. Glad to help.