Extracting Fields from String

ManUBlueJay

Active Member
Joined
Aug 30, 2012
Messages
320
Office Version
  1. 365
Platform
  1. Windows
I am working on a very large genealogy project. I need to be able to extract date, first name of person and parents name. the data will appear like this (Very consistent spaces) in A2:
January 2 Joey Joseph Schmoe (Joe & Josephine).
I would like 3 separate cells. B2:"January 2", C2:"Joey", D2: "Schmoe (Joe & Josephine)"

Thanks
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Hi,

Try this : depends of course the consistency of spaces in the sentence...

B2 =LEFT(SUBSTITUTE(A1," ","*",2),FIND("*",SUBSTITUTE(A1," ","*",2))-1)
C2 =MID(A1,FIND("*",SUBSTITUTE(A1," ","*",{2,3}))+1,(FIND("*",SUBSTITUTE(A1," ","*",3))-FIND("*",SUBSTITUTE(A1," ","*",2))))
D2 =MID(A1,FIND("*",SUBSTITUTE(A1," ","*",4))+1,60)


[TABLE="width: 737"]
<colgroup><col><col><col><col><col></colgroup><tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]January 2 Joey Joseph Schmoe (Joe & Josephine)[/TD]
[TD]Date[/TD]
[TD]Name[/TD]
[TD]Details[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][/TD]
[TD]January 2[/TD]
[TD]Joey [/TD]
[TD]Schmoe (Joe & Josephine)[/TD]
[/TR]
</tbody>[/TABLE]
 
Last edited:
Upvote 0
Hi,

Try this : depends of course the consistency of spaces in the sentence...

B2 =LEFT(SUBSTITUTE(A1," ","*",2),FIND("*",SUBSTITUTE(A1," ","*",2))-1)
C2 =MID(A1,FIND("*",SUBSTITUTE(A1," ","*",{2,3}))+1,(FIND("*",SUBSTITUTE(A1," ","*",3))-FIND("*",SUBSTITUTE(A1," ","*",2))))
D2 =MID(A1,FIND("*",SUBSTITUTE(A1," ","*",4))+1,60)


[TABLE="width: 737"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]January 2 Joey Joseph Schmoe (Joe & Josephine)[/TD]
[TD]Date[/TD]
[TD]Name[/TD]
[TD]Details[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][/TD]
[TD]January 2[/TD]
[TD]Joey[/TD]
[TD]Schmoe (Joe & Josephine)[/TD]
[/TR]
</tbody>[/TABLE]
Works Perfect
|Thank you
 
Upvote 0

Forum statistics

Threads
1,223,705
Messages
6,173,996
Members
452,542
Latest member
Bricklin

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