Can't deal with these middle names.

D_Boyd

New Member
Joined
Aug 26, 2022
Messages
13
Office Version
  1. 365
Platform
  1. Windows
I have a lot of list with names (1000 plus name on each list).
Some people have middle names.
I need to seperate each name
Given Name with any middle name and surname.
So two cells from the one

I know how to use text to colume (Delimited using spaces)
But when I am done, I have to spend hours adding the middle name (if they have one) to the "given Name cell.

Any ideas? ..... HELP!............. LOL
D_Boyd


test600.png
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Welcome to the MrExcel board!

In future, please consider the following for small sample data that is easy for helpers to test with, :)
MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.

Here are two options, depending on whether you have the recent TEXT... functions or not.

22 08 27.xlsm
ABCDEF
1
2Tom JonesTomJonesTomJones
3Ann Jane SmithAnn JaneSmithAnn JaneSmith
Names
Cell Formulas
RangeFormula
B2:B3B2=TEXTBEFORE(A2," ",-1)
C2:C3C2=TEXTAFTER(A2," ",-1)
E2:E3E2=LEFT(A2,LEN(A2)-LEN(F2)-1)
F2:F3F2=TRIM(RIGHT(SUBSTITUTE(A2," ",REPT(" ",100)),100))
 
Upvote 0
Try

Book1
ABC
1
2Aaa CccAaaCcc
3Aaa Bbb CccAaa BbbCcc
Sheet1
Cell Formulas
RangeFormula
B2:B3B2=LEFT(A2,LEN(A2)-LEN(C2)-1)
C2:C3C2=TRIM(RIGHT(SUBSTITUTE(A2," ",REPT(" ",100)),100))


Hahaha... same idea.
 
Upvote 0
That worked good except, it makes errors (sometime).
On surname. It put surname in the same cell as givenname...sometimes.

See below

D_Boyd

PS: I don't know "Flash Fill"


test2.xlsx
ABC
1Anna Maria SchulmeisterAnna MariaSchulmeister
2Joseph PreisJosephPreis
3Nicolaus BollakNicolausBollak
4Bartolomei DuckartBartolomeiDuckart
5Barbara BeierBarbaraBeier
6Susanne SeewaldSusanneSeewald
7Anna Sophia SchmidtAnna SophiaSchmidt
8Anna Maria DevivjeAnna MariaDevivje
9Maria MaeyerMariaMaeyer
10Joseph VogelJosephVogel
11Franz DistelFranzDistel
12Johann Peter VogelJohann PeterVogel
13Nicolaus SeewaldNicolausSeewald
14Anton SchlitterAntonSchlitter
15Margarethe BohnMargaretheBohn
16Barbara RollhäuserBarbaraRollhäuser
17Philipp DurbanPhilippDurban
18Franz StrömelFranzStrömel
19Joseph StrawinskiJosephStrawinski
20Johann Peter DevivjeJohann PeterDevivje
21Georg Rollhäuser Georg Rollhäuser  
22Joseph Meyer Joseph Meyer  
23Johannes DietzJohannesDietz
24Franz HartmannFranzHartmann
25Jacob EngrafJacobEngraf
26Michael StreitenbergerMichaelStreitenberger
27Peter SpötterPeterSpötter
28Maria BenderMariaBender
29Anna Maria KayserAnna MariaKayser
30Catharina EngrafCatharinaEngraf
31Magdalene WeingardtMagdaleneWeingardt
32Catharina MeyerCatharinaMeyer
33Christine StrömelChristineStrömel
34Matthias RollhäuserMatthiasRollhäuser
35Catharina SchibelbeinCatharinaSchibelbein
36Maria Theresa AltmayerMaria TheresaAltmayer
37Maria HappelMariaHappel
38Joseph GerlingJosephGerling
39Eva Suchsdorf Eva Suchsdorf  
Sheet1
Cell Formulas
RangeFormula
B1:B39B1=LEFT(A1,LEN(A1)-LEN(C1)-1)
C1:C39C1=TRIM(RIGHT(SUBSTITUTE(A1," ",REPT(" ",100)),100))
 
Upvote 0
Those lines where it did not work have several spaces after the last name in column A. Try this formula in column C instead.

Excel Formula:
=TRIM(RIGHT(SUBSTITUTE(TRIM(A1)," ",REPT(" ",100)),100))
 
Upvote 0
Solution
That worked perfectly!
I want to thank you for your help. Will save me many hours.

Thank you again!

D_Boyd
 
Upvote 0
You're welcome. Thanks for the follow-up. :)
 
Upvote 0
BTW, thanks for the sample data with XL2BB. It also gave you the reason/answer quickly whereas with only an image we would never have known those extra spaces were there. ;)
 
Upvote 0

Forum statistics

Threads
1,214,982
Messages
6,122,580
Members
449,089
Latest member
Motoracer88

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