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

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

Michael M

Well-known Member
Joined
Oct 27, 2005
Messages
21,595
Office Version
  1. 365
  2. 2019
  3. 2013
  4. 2007
Platform
  1. Windows
Try
Code:
=SUBSTITUTE(IF(LEFT(RIGHT(A1,2),1)=" ",LEFT(A1,LEN(A1)-2),A1),"","")
 
Upvote 0

DarrenF

Board Regular
Joined
Jun 9, 2014
Messages
90
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

Michael M

Well-known Member
Joined
Oct 27, 2005
Messages
21,595
Office Version
  1. 365
  2. 2019
  3. 2013
  4. 2007
Platform
  1. Windows
Okay different approach

Code:
=LEFT(A1,FIND("~",SUBSTITUTE(A1," ","~",LEN(A1)-LEN(SUBSTITUTE(A1," ",""))))-1)
 
Upvote 0

azumi

Well-known Member
Joined
Jun 4, 2013
Messages
555
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,191,076
Messages
5,984,495
Members
439,893
Latest member
johnsboxftm

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
Top