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

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
 
B

Bob Phillips

Data>Text To Columns with a delimiter of comma

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
G

Guest

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)))
 
G

Guest

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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top