ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Swapping two word and placing them in another cell (https://www.excelbanter.com/excel-worksheet-functions/220484-swapping-two-word-placing-them-another-cell.html)

Christie

Swapping two word and placing them in another 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 seperate cells.

How can I do this?

Max

Swapping two word and placing them in another cell
 
One play
Assuming data in A2 down, with a single space between words
this directly gives you the final output (Smith in B2, Allan in C2)
In B2: =RIGHT(TRIM(A2),LEN(TRIM(A2))-SEARCH(" ",TRIM(A2)))
In C2: =LEFT(TRIM(A2),LEN(TRIM(A2))-SEARCH(" ",TRIM(A2)))
Copy B2:C2 down
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:23,000 Files:370 Subscribers:66
xdemechanik
---
"Christie" wrote:
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 seperate cells.

How can I do this?



All times are GMT +1. The time now is 08:46 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com