ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Text moving (https://www.excelbanter.com/excel-worksheet-functions/54116-text-moving.html)

azazel

Text moving
 

I want to move text thats in the middle of the cell to the begining of
the cell...

Cell A1 Reads "DANIEL & BETTINA SMITH ACCOUNT INFO"

Cell B1 reads "SMITH"


Ex. Using cell B1, take the text "SMITH" and move it to the front of
the text string while deleting the other "SMITH" in the middle...
"SMITH, DANIEL & BETTINA SMITH ACCOUNT INFO"

I want cell A1 or C1 to look like this "SMITH, DANIEL & BETTINA ACCOUNT
INFO"

is this possible???


--
azazel
------------------------------------------------------------------------
azazel's Profile: http://www.excelforum.com/member.php...o&userid=28250
View this thread: http://www.excelforum.com/showthread...hreadid=482849


bpeltzer

Text moving
 
This equation requires a space character to be found after the string in B1...
=IF(ISNUMBER(FIND(B1&" ",A1)),B1&",
"&LEFT(A1,FIND(B1,A1)-1)&RIGHT(A1,LEN(A1)-LEN(B1)-FIND(B1,A1)),A1)
--Bruce


"azazel" wrote:


I want to move text thats in the middle of the cell to the begining of
the cell...

Cell A1 Reads "DANIEL & BETTINA SMITH ACCOUNT INFO"

Cell B1 reads "SMITH"


Ex. Using cell B1, take the text "SMITH" and move it to the front of
the text string while deleting the other "SMITH" in the middle...
"SMITH, DANIEL & BETTINA SMITH ACCOUNT INFO"

I want cell A1 or C1 to look like this "SMITH, DANIEL & BETTINA ACCOUNT
INFO"

is this possible???


--
azazel
------------------------------------------------------------------------
azazel's Profile: http://www.excelforum.com/member.php...o&userid=28250
View this thread: http://www.excelforum.com/showthread...hreadid=482849




All times are GMT +1. The time now is 07:02 PM.

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