ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Can I divide a column at the first "space" occurance (https://www.excelbanter.com/excel-worksheet-functions/13963-can-i-divide-column-first-%22space%22-occurance.html)

jv

Can I divide a column at the first "space" occurance
 
I have a Column that is currently set up as follows:

jones john & sharon

I want to divide the column and make two colums like:

Column one = Jones
Column Two= & Sharon


Myrna Larson

And what has happened to "John"? Eliminated?

On Fri, 18 Feb 2005 10:37:12 -0800, "jv" wrote:

I have a Column that is currently set up as follows:

jones john & sharon

I want to divide the column and make two colums like:

Column one = Jones
Column Two= & Sharon



James

You can use Text to Columns to do this. Go to Data - Text to Columns and
follow the instructions

James


"jv" wrote in message
...
I have a Column that is currently set up as follows:

jones john & sharon

I want to divide the column and make two colums like:

Column one = Jones
Column Two= & Sharon




jv

John would stay in the first column

"Myrna Larson" wrote:

And what has happened to "John"? Eliminated?

On Fri, 18 Feb 2005 10:37:12 -0800, "jv" wrote:

I have a Column that is currently set up as follows:

jones john & sharon

I want to divide the column and make two colums like:

Column one = Jones
Column Two= & Sharon




jv

The space isn't in the same position in each row.

JV

"James" wrote:

You can use Text to Columns to do this. Go to Data - Text to Columns and
follow the instructions

James


"jv" wrote in message
...
I have a Column that is currently set up as follows:

jones john & sharon

I want to divide the column and make two colums like:

Column one = Jones
Column Two= & Sharon





[email protected]

Assuming your text is in A1
In B1 enter =LEFT(A1,FIND("&",A1,1)-1) to get jones john
In C1 enter =MID(A1,FIND("&",A1,1),LEN(A1)-FIND("&",A1,1)+1) to get &
Sharon
Ilan


Myrna Larson

If you use Data/Text to Columns, with the delimiter as "&". That will give you

"Jones John " in column 1 and " Sharon" in column 2

But that leaves you leading and trailing spaces. If you first use Search and
Replace to replace " & " with "&", then Text to Columns, that will take care
of that issue


On Sat, 19 Feb 2005 12:11:01 -0800, "jv" wrote:

John would stay in the first column

"Myrna Larson" wrote:

And what has happened to "John"? Eliminated?

On Fri, 18 Feb 2005 10:37:12 -0800, "jv"

wrote:

I have a Column that is currently set up as follows:

jones john & sharon

I want to divide the column and make two colums like:

Column one = Jones
Column Two= & Sharon





jv

Thank you so much. That worked for me
JV

" wrote:

Assuming your text is in A1
In B1 enter =LEFT(A1,FIND("&",A1,1)-1) to get jones john
In C1 enter =MID(A1,FIND("&",A1,1),LEN(A1)-FIND("&",A1,1)+1) to get &
Sharon
Ilan




All times are GMT +1. The time now is 12:33 AM.

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