Split a text

G

Guest

Dear All

I have in column E mix address with post codes
eg: Blythswood square
G12BG Glasgow

In the text the split between address and post code is by Enter

How can i split it into two columns F & G
I wne form data --> text to column but i do not know how to declare the
Enter symbol.
Any ideas?

Thansk in advance
Manos
 
R

Roger Govier

Hi
I don't think this can be down with Data>Text to columns.

In cell B1 enter
=LEFT(A1,FIND(CHAR(10),A1)-1)
in cell C1 enter
=MID(A1,FIND(CHAR(10),A1)+1,255)
Copy down as far as required.

Then copy columns B:C and Paste Special>Values back over the formulae to fix
the data.
 
G

Guest

In column F enter this formula
=LEFT(A1,FIND("
",A1,1)-1)

In column G enter this formula

=LEFT(A1,FIND("
",A1,1)-1)

between quotation marks press ALT+ENTER.
 
R

Ron Rosenfeld

Dear All

I have in column E mix address with post codes
eg: Blythswood square
G12BG Glasgow

In the text the split between address and post code is by Enter

How can i split it into two columns F & G
I wne form data --> text to column but i do not know how to declare the
Enter symbol.
Any ideas?

Thansk in advance
Manos

To use the line feed symbol as the delimeter, when you get to the "delimiter"
page in the text-to-columns wizard, select Other. With the cursor in the box
next to other, hold down <alt> while you type ON THE NUMERIC KEYPAD "0 1 0"
(You must use the keypad, and not the numbers above the regular keyboard).

Then release the <alt> and select Finish.
--ron
 
G

Guest

Thank you Both

Roger Govier said:
Hi
I don't think this can be down with Data>Text to columns.

In cell B1 enter
=LEFT(A1,FIND(CHAR(10),A1)-1)
in cell C1 enter
=MID(A1,FIND(CHAR(10),A1)+1,255)
Copy down as far as required.

Then copy columns B:C and Paste Special>Values back over the formulae to fix
the data.
 
R

Roger Govier

Excellent Ron!

I had tried typing Alt Enter, and Char(10) into the box - all to no avail.
Didn't think about using your method.
 
G

Gord Dibben

CTRL + j also works in the "replace what" dialog to locate the linefeed Alt +
Enter


Gord Dibben MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top