Thread: parsename
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
ct60 ct60 is offline
external usenet poster
 
Posts: 26
Default parsename

Ok, this should do the trick. Assume that the name is in Cell A2.
Add cols as shown below. Make Col B (place where comma is) hidden. You can
actually avoid using a Col B, by substituting the formula in cell B2 whenever
you see B2 in the formula of the other cells.

Col A Col B Col C Col D Col E
Comma First Name Middle Name Last Name
LastName,John Q 9 John Q. LastName

So the formulas a
Cell B2 (Comma): =FIND(",",A2)
Cell C2 (First Name): =MID(A2,B2+1,FIND(" ",A2, B2)-B2-1)
Cell D2 (Middle Name): =RIGHT(A2,1) & "."
Cell E2 (Last Name): =LEFT(A2,B2-1)

Then you can copy or autofill these formulas down each row.

Hope that helps.

Chris (ct60)


"gh" wrote:

I have a worksheet with the full name in one of the columns. Below is
an example. I would like to add a . after the middle initial then copy
the firstname, lastname and middle initial to seperate columns. Is ther
a function for this?

TIA

A B C D
LastName,John Q. John Q. LastName