Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
GEM GEM is offline
external usenet poster
 
Posts: 90
Default Splitting Numbers into Columns.

I have under column A numbers with different lengths.
A1=125
A2=1025
A3=9
A4=589644
ETC....

I want to separate each individual number into a cell.
for example
A1=1
B1=2
C1=5
A2=1
B2=0
C2=2
D2=5
ETC...

I've tried TEXT TO COLUMNS, but I have to use fixed width, and sometimes
it's just to long, is there an easier way??

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Splitting Numbers into Columns.

Hi,

Right click your sheet tab, view code and paste this in and run it

Sub Split_Em()
Dim MyRange As Range, x as long
LastRow = Cells(Rows.Count, "A").End(xlUp).Row
Set MyRange = Range("A1:A" & LastRow)
For Each c In MyRange
For x = 1 To Len(c)
Cells(Cells(Rows.Count, "B").End(xlUp).Row + 1, 2) = Mid(c, x, 1)
Next
Next
Columns("A").EntireColumn.Delete
End Sub


Mike

"GEM" wrote:

I have under column A numbers with different lengths.
A1=125
A2=1025
A3=9
A4=589644
ETC....

I want to separate each individual number into a cell.
for example
A1=1
B1=2
C1=5
A2=1
B2=0
C2=2
D2=5
ETC...

I've tried TEXT TO COLUMNS, but I have to use fixed width, and sometimes
it's just to long, is there an easier way??

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,420
Default Splitting Numbers into Columns.

Use

=IF(LEN($A1)=COLUMN(A1),--MID($A1,COLUMN(A1),1),"")

and copy over as many columns as you think you will need.

--
__________________________________
HTH

Bob

"GEM" wrote in message
...
I have under column A numbers with different lengths.
A1=125
A2=1025
A3=9
A4=589644
ETC....

I want to separate each individual number into a cell.
for example
A1=1
B1=2
C1=5
A2=1
B2=0
C2=2
D2=5
ETC...

I've tried TEXT TO COLUMNS, but I have to use fixed width, and sometimes
it's just to long, is there an easier way??



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Splitting Numbers into Columns.

misread you post, forget this

"Mike H" wrote:

Hi,

Right click your sheet tab, view code and paste this in and run it

Sub Split_Em()
Dim MyRange As Range, x as long
LastRow = Cells(Rows.Count, "A").End(xlUp).Row
Set MyRange = Range("A1:A" & LastRow)
For Each c In MyRange
For x = 1 To Len(c)
Cells(Cells(Rows.Count, "B").End(xlUp).Row + 1, 2) = Mid(c, x, 1)
Next
Next
Columns("A").EntireColumn.Delete
End Sub


Mike

"GEM" wrote:

I have under column A numbers with different lengths.
A1=125
A2=1025
A3=9
A4=589644
ETC....

I want to separate each individual number into a cell.
for example
A1=1
B1=2
C1=5
A2=1
B2=0
C2=2
D2=5
ETC...

I've tried TEXT TO COLUMNS, but I have to use fixed width, and sometimes
it's just to long, is there an easier way??

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
splitting numbers miki peric Excel Discussion (Misc queries) 3 January 6th 09 12:05 AM
help on splitting into columns [email protected] Excel Discussion (Misc queries) 5 November 8th 08 07:58 PM
Splitting Numbers Xaenyth Excel Discussion (Misc queries) 2 December 19th 06 05:59 PM
Splitting item numbers Spencer Excel Discussion (Misc queries) 5 October 11th 06 07:35 PM
Splitting Numbers Into Different Columns Peter W Soady \(UK\) Excel Discussion (Misc queries) 3 September 30th 06 07:57 PM


All times are GMT +1. The time now is 11:50 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"