Help with manipulating text in Excel 2003

B

Big UT Fan

I have a column which is in the format of "Lastname, Firstname
textidonotcareabout".
I'd like to change the text to Firstname Lastname via a function. Is this
possible? If not then I'm trying to learn some basic VBA programming so a
macro could be an option. Thanks in advance!
 
A

akphidelt

Try using Data-->Text-to-Columns... then go to Delimited and select space.

Other then that I know functions to switch last and first names but not with
extra data involved.
 
G

Gary''s Student

With data in A1, first find the first space, in B1 enter:

=FIND(" ",A1,1)

To find the second space, in C1 enter:

=FIND(" ",A1,B1+1)

Finally in D1:

= MID(A1,B1,C1-B1+1) & LEFT(A1,B1-2)
 
R

Ron Rosenfeld

I have a column which is in the format of "Lastname, Firstname
textidonotcareabout".
I'd like to change the text to Firstname Lastname via a function. Is this
possible? If not then I'm trying to learn some basic VBA programming so a
macro could be an option. Thanks in advance!

Perhaps:

=LEFT(TRIM(MID(A1,FIND(",",A1)+1,255)),FIND(" ",A1))
& TRIM(LEFT(A1,FIND(",",A1)-1))

--ron
 

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