Split First and Last Names, removing any middle names

Ronanm

Board Regular
Joined
Nov 13, 2010
Messages
107
Hi

I need to split First and Last Names, removing any middle names as per the table below;

A1
B1
Currently
Becomes
Walker Barbara Ann
Barbara Walker
Taylor Ron James
Ron Taylor
Clark Steve
Steve Clark
Price Kevin Liam Pat
Kevin Price

<tbody>
</tbody>


<tbody>
</tbody>
Thanks
 
Last edited:

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
One way:
Code:
=TRIM(MID(SUBSTITUTE(A1," ",REPT(" ",100)),100,100)) & " " & TRIM(LEFT(SUBSTITUTE(A1," ",REPT(" ",100)),100))
 
Last edited:
Upvote 0
You can also use Flash Fill. To do so, put your list in Column A, then for 1 or 2 cells, manually put in the desired result. I had to put in B1 and B3. Then you can select a cell in column B and press Control+E. Excel will try to fill in the rest of the column, using your example(s) as a model.

However, whichever method you use, be aware that some names just don't parse easily. I have a sister-in-law named Jayne Ann, and you do NOT call her Jayne! So first names like Mary Jo, or last names like St. James, could both cause you problems.
 
Upvote 0
A little shorter:
=TRIM(MID(SUBSTITUTE(A1," ",REPT(" ",255)),255,255))&LEFT(" "&A1,FIND(" ",A1&" "))
 
Upvote 0
Wow. Thank you all so much. Joe 4 Eric W and Scott Huish. Appreciate it. I'll go with the last one as I can investigate all the formulas together :)

Thanks
 
Upvote 0

Forum statistics

Threads
1,214,634
Messages
6,120,659
Members
448,975
Latest member
sweeberry

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