Extract middle int. from Last Name, Firlst Name Middle Int.

DarrenF

Board Regular
Joined
Jun 9, 2014
Messages
90
Hi there,

Looking for some help with a formula for removing middle initial from a cell with Last Name, First Name Middle Initial. Example:

Johns, Jimmy E

Also, some of the people that are in the list do not have a middle name.

Any help would be much appreciated!

Thanks!
Darren
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Try
Code:
=SUBSTITUTE(IF(LEFT(RIGHT(A1,2),1)=" ",LEFT(A1,LEN(A1)-2),A1),"","")
 
Upvote 0
Thank you Michael!

I oppologize, that worked for those that I gave the expample for. I forgot to metion that I also have some that have full middle names spelled out. Example:

Johns, Jimmy Edward
 
Upvote 0
Okay different approach

Code:
=LEFT(A1,FIND("~",SUBSTITUTE(A1," ","~",LEN(A1)-LEN(SUBSTITUTE(A1," ",""))))-1)
 
Upvote 0
For have middle name or dont have it:

=LEFT(A1,SEARCH(",",A1,1)-1)&", "&TRIM(MID(SUBSTITUTE(A1," ",REPT(" ",99)),100,99))
 
Upvote 0

Forum statistics

Threads
1,214,915
Messages
6,122,212
Members
449,074
Latest member
cancansova

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