Best way to split out text in following format

Sundance_Kid

Board Regular
Joined
Sep 2, 2017
Messages
155
Office Version
  1. 365
Platform
  1. Windows
I have text in the following format:

Clinton\Bill Jefferson
Trump\ Donald

What I want to do (ideally without a macro as my skills are non-existent) is change both names so they appear as:

Bill Clinton
Donald Trump

However, as you see in one instance there is only one first name - Donald where as in the other example there is a first and second name - Bill Jefferson - and I want it to only pull the first name.

Thanks.
 
How about
Fluff.xlsm
AB
1
2Clinton\Bill JeffersonBill Clinton
3Trump\ DonaldDonald Trump
Sheet6
Cell Formulas
RangeFormula
B2:B3B2=TEXTJOIN(" ",,CHOOSECOLS(TEXTSPLIT(A2,{"\","\ "," "}),2,1))
Thank you Fluffy, very helpful. I don’t know how you figure these formulas out 😀.

One related question, if the name was in the format
O Dwyer\ Michael the formula would return Dwyer O rather than Michael Dwyer.

Is there a way to build into the original formula that in instances like that, it returns Michael Dwyer rather than Dwyer O?

Thank you
 
Upvote 0
How about
Excel Formula:
=TEXTBEFORE(TRIM(TEXTAFTER(A2,"\"))," ",,,1)&" "&TEXTAFTER(TEXTBEFORE(A2,"\")," ",-1,,1)
 
Upvote 0

Forum statistics

Threads
1,226,834
Messages
6,193,214
Members
453,779
Latest member
C_Rules

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top