A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Separate Numeric and Text data



 
 
Thread Tools Display Modes
  #1  
Old May 30th, 2004, 11:50 PM
MG
external usenet poster
 
Posts: n/a
Default 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  
Old May 31st, 2004, 12:11 AM
Aladin Akyurek
external usenet poster
 
Posts: n/a
Default 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  
Old May 31st, 2004, 12:20 AM
Andy Brown
external usenet poster
 
Posts: n/a
Default 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  
Old May 31st, 2004, 12:45 AM
Peo Sjoblom
external usenet poster
 
Posts: n/a
Default 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  
Old May 31st, 2004, 03:30 AM
Soo Cheon Jheong
external usenet poster
 
Posts: n/a
Default 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  
Old May 31st, 2004, 04:45 AM
mg
external usenet poster
 
Posts: n/a
Default 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  
Old May 31st, 2004, 04:46 AM
mg
external usenet poster
 
Posts: n/a
Default 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  
Old May 31st, 2004, 04:47 AM
mg
external usenet poster
 
Posts: n/a
Default 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  
Old May 31st, 2004, 04:47 AM
mg
external usenet poster
 
Posts: n/a
Default 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  
Old May 31st, 2004, 05:03 AM
Aladin Akyurek
external usenet poster
 
Posts: n/a
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


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


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.