Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

reversing text in excel cell? 2

Status
Not open for further replies.

drmichaelw

IS-IT--Management
Oct 5, 2002
66
US
I am using excel and I would like to do the following

"Rick Bird" is in one cell. I want to reverse first and last name and insert a comma.

"Bird, Rick"... Like this.

I have over 5000 records to change.
Can anyone help?
 
Based on your example, this will work...

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

Hope this helps. :) Please advise as to how it fits.

Regards, ...Dale Watson dwatson@bsi.gov.mb.ca
 
sub tranpkp()

for x = 1 to 5000
cells(x, 3) = cells(x,2) & ", " & cells(x, 1)
next x

end sub [yinyang] Tranpkp [pc2]
************************************
- Let me know if this helped/worked!
Please remember to give helpful posts the stars they deserve!
This facilitates others navigating through the threads / posts!
 
or yes if you want into the sheet via formula (first in first column, last in 2nd col) paste this if 3rd column and autofill down:

[=B1 & ", " & A1] *no brackets [yinyang] Tranpkp [pc2]
************************************
- Let me know if this helped/worked!
Please remember to give helpful posts the stars they deserve!
This facilitates others navigating through the threads / posts!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top