Rearrange the contents of a cell using a formula

Dear Experts

In excel I need to rearrange the contents of a cell using a formula ... Each cell has 3 bits of information

job, company, dates (i.e. CEO, Microsoft, 2015-2018)

These are all all separated by ", " (Comma space) & I need the result to read

company, job, dates (i.e. Microsoft, CEO, 2015-2018)

Can anyone help?
correlateAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Brian BEE Topic Advisor, Independant Technology ProfessionalCommented:
It would be a combination of MID functions and FINDs to locate the ", " text.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
Assuming your string is in A2, then try this...
In B2
=TRIM(MID(SUBSTITUTE(", "&$A2,", ",REPT(" ",LEN($A2))),COLUMNS($B2:B2)*LEN($A2),LEN($A2)))

Open in new window

and then copy to right.
0
correlateAuthor Commented:
That gave me the lead to how to solve it, so thanks for that - in the end the formula was ...

=TRIM(MID(SUBSTITUTE(","&AB2,",",REPT(" ",LEN(AB2))),LEN(AB2)*(LEN(AB2)-LEN(SUBSTITUTE(AB2,",",""))),LEN(AB2))) &" - "&LEFT(AB2,FIND(",",AB2,1)-1)&IF(RIGHT(AB2,1)="-"," ("&RIGHT(AB2,5)&"Present"," ("&RIGHT(AB2,9))&")"
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

correlateAuthor Commented:
That gave me the lead to how to solve it, so thanks for that - in the end the formula was ...

=TRIM(MID(SUBSTITUTE(","&AB2,",",REPT(" ",LEN(AB2))),LEN(AB2)*(LEN(AB2)-LEN(SUBSTITUTE(AB2,",",""))),LEN(AB2))) &" - "&LEFT(AB2,FIND(",",AB2,1)-1)&IF(RIGHT(AB2,1)="-"," ("&RIGHT(AB2,5)&"Present"," ("&RIGHT(AB2,9))&")"
0
correlateAuthor Commented:
That gave me the lead to how to solve it, so thanks for that - in the end the formula was ...

=TRIM(MID(SUBSTITUTE(","&AB2,",",REPT(" ",LEN(AB2))),LEN(AB2)*(LEN(AB2)-LEN(SUBSTITUTE(AB2,",",""))),LEN(AB2))) &" - "&LEFT(AB2,FIND(",",AB2,1)-1)&IF(RIGHT(AB2,1)="-"," ("&RIGHT(AB2,5)&"Present"," ("&RIGHT(AB2,9))&")"
0
correlateAuthor Commented:
That gave me the lead to how to solve it, so thanks for that - in the end the formula was ...

=TRIM(MID(SUBSTITUTE(","&AB2,",",REPT(" ",LEN(AB2))),LEN(AB2)*(LEN(AB2)-LEN(SUBSTITUTE(AB2,",",""))),LEN(AB2))) &" - "&LEFT(AB2,FIND(",",AB2,1)-1)&IF(RIGHT(AB2,1)="-"," ("&RIGHT(AB2,5)&"Present"," ("&RIGHT(AB2,9))&")"
0
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
Sorry to say but you should learn how to ask a question and accept an answer.
We provide solution based on the description and sample data you provide and the formula I suggested produced the desired output based on the sample data you provided in the description.

Formula.jpg
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.