![]() |
Swapping two words in one cell
I have two words in one cell and would like to swap them and place them in
another cell eg Allan Smith and I would like it to say Smith Allan. Once this is done I would then like the two words into two seperete cells. How can I do this? |
Swapping two words in one cell
Try this...
=MID(A1&" "&A1,FIND(" ",A1)+1,LEN(A1)) -- Rick (MVP - Excel) "Christie" wrote in message ... I have two words in one cell and would like to swap them and place them in another cell eg Allan Smith and I would like it to say Smith Allan. Once this is done I would then like the two words into two seperete cells. How can I do this? |
Swapping two words in one cell
=RIGHT(E12,LEN(E12)-SEARCH(" ",E12)) & " " & LEFT(E12,SEARCH(" ",E12)-1) You can put it into two cells by using the Right and Left parts of the code separately. -- mdmackillop ------------------------------------------------------------------------ mdmackillop's Profile: http://www.thecodecage.com/forumz/member.php?userid=113 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=62831 |
All times are GMT +1. The time now is 02:37 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com