View Single Post
  #12   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On Tue, 28 Jun 2005 15:25:51 -0500, JFALK
wrote:


I need a similar effect to the one above, but my list contains names in
the form LASTNAME, FIRSTNAME MI. and I want to remove the middle
initials. Not all of them have a middle initial in them. Thanks!



Try this:

=IF((LEN(TRIM(A1))-LEN(SUBSTITUTE(TRIM(A1)," ","")))<2,
TRIM(A1),LEFT(TRIM(A1),FIND(CHAR(1),SUBSTITUTE(
TRIM(A1)," ",CHAR(1),2))-1))


--ron