Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need to extract all numbers into different columns (delimiter is ,). e.g.
1,325,16420,5,6,120,4643,2,8,-71,-68,-6 the length of numbers within could vary. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Put you comma delimited string in cell A1. code will put numbers starting in
row 2 cell A2. Sub splitstring() MyString = Range("A1").Value MyOff = 0 Do While InStr(MyString, ",") 0 MyNum = Val(Left(MyString, InStr(MyString, ",") - 1)) MyString = Mid(MyString, InStr(MyString, ",") + 1) Range("A2").Offset(0, MyOff).Value = MyNum MyOff = MyOff + 1 Loop MyNum = Val(MyString) Range("A2").Offset(0, MyOff).Value = MyNum End Sub "Gits" wrote: I need to extract all numbers into different columns (delimiter is ,). e.g. 1,325,16420,5,6,120,4643,2,8,-71,-68,-6 the length of numbers within could vary. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Data/Text to Columns/separated by comma
Regards, Stefi €˛Gits€¯ ezt Ć*rta: I need to extract all numbers into different columns (delimiter is ,). e.g. 1,325,16420,5,6,120,4643,2,8,-71,-68,-6 the length of numbers within could vary. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Extract cell data from multiple files in one folder | Excel Discussion (Misc queries) | |||
Macro syntax to check string length in a cell | Excel Discussion (Misc queries) | |||
extracting data from a text string of varying length | Excel Discussion (Misc queries) | |||
how to extract data in .txt format from the excel sheet in a fixed length ascii forma | Excel Programming | |||
Excel VBA- format string length to get a cell height | Excel Programming |