Solved

How Can I switch string

Posted on 2016-09-24
3
32 Views
Last Modified: 2016-09-24
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
0
Comment
Question by:fb1990
  • 2
3 Comments
 
LVL 29

Accepted Solution

by:
Subodh Tiwari (Neeraj) earned 500 total points
ID: 41813906
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

0
 
LVL 1

Author Closing Comment

by:fb1990
ID: 41813920
Thank you very much Sir.  Worked like a charm!
0
 
LVL 29

Expert Comment

by:Subodh Tiwari (Neeraj)
ID: 41813965
You're welcome. Glad to help.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question