Extracting a middle word in cell without space separation

sergiopcrt

New Member
Joined
May 12, 2017
Messages
12
Hello everyone,

I need to extract the FirstName from cells in a particular format LastName,FirstName MiddleName1 MiddleName2
Note that LastName,FirstName has no space in between, only the comma so I adapted a formula I found on google to:
=MID(A10,SEARCH(",",A10,1)+1,SEARCH(" ",A10,SEARCH(" ",A10,1)+1)-SEARCH(",",A10,1))

but it is still returning FirstName MiddleName1 and other variations return FirstName Mi

From my google searches and in this forum I got no results. Can you help me on this?

Season's greetings!
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
If you wanted this one can be dragged right and will produce all the names in order:

=TRIM(MID(SUBSTITUTE(SUBSTITUTE($A1,","," ")," ",REPT(" ",LEN($A1))),(COLUMNS($A$1:A1)-1)*LEN($A1)+1,LEN($A1)))
 
Upvote 0
If you wanted this one can be dragged right and will produce all the names in order:

=TRIM(MID(SUBSTITUTE(SUBSTITUTE($A1,","," ")," ",REPT(" ",LEN($A1))),(COLUMNS($A$1:A1)-1)*LEN($A1)+1,LEN($A1)))
Also very useful, this is like the gourmet version of the previous one :)
 
Upvote 0

Forum statistics

Threads
1,215,366
Messages
6,124,514
Members
449,168
Latest member
CheerfulWalker

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