Split full name w/single and multiple middle names

MrManBoy

New Member
Joined
May 28, 2014
Messages
37
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
  3. Web
Hi All,

Problem:

I have a data-set that has a list of full names. Splitting the first and last name is fine enough however, some of the names have multiple names between first and last name. Looking for a way (preferably w/a formula),that splits these multiple names as well splitting first and last name. Where possible, the split should occur in a single cell and not separated individually.

FYI - here is the formula I am using to split first and last name: =MID(A2&" "&A2,FIND(" ",A2)+1,LEN(A2))

Example:
Book1
AB
1Original DataDesired Data
2Doe JohnJohn Doe
3Doe JaneJane Doe
4Smith AaronAaron Smith
5Paul James SamSam Paul James
6Van Nie Sims JoeJoe Van Nie Sims
Sheet1


Thanking you in advance.

:cool:
 
Last edited by a moderator:

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Thank you so much Peter this is perfect!!

Cheers!
 
Last edited:
Upvote 0
Cell Formulas
RangeFormula
B2:B6B2=LEFT(TRIM(RIGHT(SUBSTITUTE(A2," ",REPT(" ",50)),50))&" "&A2,LEN(A2))


Peter, would it be too much to ask if you could break down the formula in terms of what it's doing? Just within the substitute section, with the repeating of the 'blanks' etc. I just tried to work this out but not sure to be honest on whats happening. If not, no dramas at all. Cheers.
 
Last edited by a moderator:
Upvote 0
The SUBSTITUTE puts 50 spaces between each word.
Taking the RIGHT 50 characters will give some spaces followed by the last word.
TRIM removes the spaces leaving you with the last word.
The rest is similar to your original function.
 
Upvote 0
The SUBSTITUTE puts 50 spaces between each word.
Taking the RIGHT 50 characters will give some spaces followed by the last word.
TRIM removes the spaces leaving you with the last word.
The rest is similar to your original function.


Ahh ok, no worries thanks for sharing that Peter.

Cheers. (y)
 
Upvote 0

Forum statistics

Threads
1,214,586
Messages
6,120,402
Members
448,958
Latest member
Hat4Life

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