How can I extract the first & last name separated by a comma

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I have a column A which has first and last name separated by a comma as
follows:

*Cloumn A*
Bernhardt,Gail
Wygonik, Mark
Patel,Arpna

Now, what I need is to be able to separate the two into 2 columns so I can
get, col. B and C:

*Col B* *Col C*
Bernhardt Gail
Wygonik Mark
Patel Arpna

Thanks for your help!
MSA
 
Data>Text To Columns with a delimiter of comma

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
Use the following formula in column B:

=LEFT(A1,FIND(",",A1,1)-1)

Use the following formula in column C:

=RIGHT(A1,LEN(A1)-(FIND(",",A1,1)))
 
Try this:

For a name in A1 (eg Bernhardt,Gail)

Last name
B1: =TRIM(LEFT(A1,FIND(",",A1)-1))

First name
C1: =TRIM(MID(A1,FIND(",",A1)+1,LEN(A1)))

Does that help?
***********
Regards,
Ron

XL2002, WinXP
 
Hi MSA,

There is a function Text to Columns under the Data menu.
If you copy the data to column B and use the Text to Columns function under
the Data menu, choosing Delimited and comma as the delimiter, it will convert
the data into columns B and C

Anthony
 
Back
Top