If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Separate Numeric and Text data
Hi
I have the following data in a spreadsheet, for example starting from A1: 1 2 3 14a 1ab 123c I want to be able to separate this data into two columns. Have tried Text To Columns, and have had no luck. There are no separators between the data, and the data is of varying lengths - any ideas would be most appreciated. |
#2
|
|||
|
|||
Separate Numeric and Text data
B1:
=--LEFT(A1,SUMPRODUCT((LEN(A1)-LEN(SUBSTITUTE(A1,{".",0,1,2,3,4,5,6,7,8,9}," "))))) C1: =SUBSTITUTE(A1,B1,"") The formulas expect input in A1 in the form DigitSequence followed by text, with no digit in the latter part. "MG" wrote in message ... Hi I have the following data in a spreadsheet, for example starting from A1: 1 2 3 14a 1ab 123c I want to be able to separate this data into two columns. Have tried Text To Columns, and have had no luck. There are no separators between the data, and the data is of varying lengths - any ideas would be most appreciated. |
#3
|
|||
|
|||
Separate Numeric and Text data
This from Jason Morin appears to work, I've no idea how -
=LEFT(A1,SUM(1*NOT(ISERROR(1*(MID(A1,ROW(INDIRECT( "1:"&LEN(A1))),1))))))&" "&RIGHT(A1,LEN(A1)-SUM(1*NOT(ISERROR(1*(MID(A1,ROW(INDIRECT("1:"&LEN( A1))),1 )))))) This is an array formula, you'll need to use CTRL+Shift+Enter instead of plain Enter. From there, you should be able to copy & paste special (values), then Data -- Text to Columns. Rgds, Andy |
#4
|
|||
|
|||
Separate Numeric and Text data
Another way
=--MID(A1,MATCH(FALSE,ISERROR(--MID(A1,ROW(INDIRECT("1:100")),1)),0),100-SUM (--ISERROR(1*MID(A1,ROW(INDIRECT("1:100")),1)))) entered with ctrl + shift & enter will work if the numbers always are together, if not post back -- For everyone's benefit keep the discussion in the newsgroup. Regards, Peo Sjoblom "MG" wrote in message ... Hi I have the following data in a spreadsheet, for example starting from A1: 1 2 3 14a 1ab 123c I want to be able to separate this data into two columns. Have tried Text To Columns, and have had no luck. There are no separators between the data, and the data is of varying lengths - any ideas would be most appreciated. |
#5
|
|||
|
|||
Separate Numeric and Text data
Hi,
B1: =IF(ISTEXT(A1),--LEFT(A1,SUMPRODUCT(COUNTIF(A1,"*"&{".",0,1,2,3,4,5 ,6,7,8,9} &"*"))),A1) C1: =SUBSTITUTE(A1,B1,"") -- Regards, Soo Cheon Jheong Seoul, Korea _ _ ^ąŻ^ -- |
#6
|
|||
|
|||
Separate Numeric and Text data
Excellent, this works well.
-----Original Message----- Hi, B1: =3DIF(ISTEXT(A1),--LEFT(A1,SUMPRODUCT(COUNTIF(A1,"*"& {".",0,1,2,3,4,5,6,7,8,9} &"*"))),A1) C1: =3DSUBSTITUTE(A1,B1,"") -- Regards, Soo Cheon Jheong Seoul, Korea _ _ ^=A2=AF^ --=20 . |
#7
|
|||
|
|||
Separate Numeric and Text data
Thanks, works well.
-----Original Message----- B1: =--LEFT(A1,SUMPRODUCT((LEN(A1)-LEN(SUBSTITUTE(A1, {".",0,1,2,3,4,5,6,7,8,9}," "))))) C1: =SUBSTITUTE(A1,B1,"") The formulas expect input in A1 in the form DigitSequence followed by text, with no digit in the latter part. "MG" wrote in message ... Hi I have the following data in a spreadsheet, for example starting from A1: 1 2 3 14a 1ab 123c I want to be able to separate this data into two columns. Have tried Text To Columns, and have had no luck. There are no separators between the data, and the data is of varying lengths - any ideas would be most appreciated. . |
#8
|
|||
|
|||
Separate Numeric and Text data
Thanks, I'll try this.
-----Original Message----- Another way =--MID(A1,MATCH(FALSE,ISERROR(--MID(A1,ROW(INDIRECT ("1:100")),1)),0),100-SUM (--ISERROR(1*MID(A1,ROW(INDIRECT("1:100")),1)))) entered with ctrl + shift & enter will work if the numbers always are together, if not post back -- For everyone's benefit keep the discussion in the newsgroup. Regards, Peo Sjoblom "MG" wrote in message ... Hi I have the following data in a spreadsheet, for example starting from A1: 1 2 3 14a 1ab 123c I want to be able to separate this data into two columns. Have tried Text To Columns, and have had no luck. There are no separators between the data, and the data is of varying lengths - any ideas would be most appreciated. . |
#9
|
|||
|
|||
Separate Numeric and Text data
Thanks, I'll try this.
-----Original Message----- This from Jason Morin appears to work, I've no idea how - =LEFT(A1,SUM(1*NOT(ISERROR(1*(MID(A1,ROW(INDIRE CT ("1:"&LEN(A1))),1))))))&" "&RIGHT(A1,LEN(A1)-SUM(1*NOT(ISERROR(1*(MID(A1,ROW (INDIRECT("1:"&LEN(A1))),1 )))))) This is an array formula, you'll need to use CTRL+Shift+Enter instead of plain Enter. From there, you should be able to copy & paste special (values), then Data -- Text to Columns. Rgds, Andy . |
#10
|
|||
|
|||
Separate Numeric and Text data
Not with duplicate digits in the didit sequence...
Try: 1222Saturnus "mg" wrote in message ... Excellent, this works well. -----Original Message----- Hi, B1: =IF(ISTEXT(A1),--LEFT(A1,SUMPRODUCT(COUNTIF(A1,"*"& {".",0,1,2,3,4,5,6,7,8,9} &"*"))),A1) C1: =SUBSTITUTE(A1,B1,"") -- Regards, Soo Cheon Jheong Seoul, Korea _ _ ^ąŻ^ -- . |
Thread Tools | |
Display Modes | |
|
|