string into table

D

Darren

a data extraction from a web site produces this:
849,2300,365086280 6098,99,22710853 3461,99,22711036 128,99,61228398
1161,99,39212169 7590,99,16618984 909,99,13522367 2603,99,17537097
4818,99,15199573 3494,99,17808832 1874,99,18283261 17758,96,9770047
2261,99,14261597 6734,93,7538199 5511,92,6701137 3862,94,8317264
3197,92,6817789 4201,89,4941989 12289,89,5065359 1382,99,14296490
5504,93,7295153 6238,86,3603191 12359,90,5346778 669,99,13109823
681,99,13188894

Question is, how do i transfer that data into a table of 3 columns?
 
D

Darren

My apologies for not explaining my problem properly. I am using a data
connection to gather the data. I want to result to be displayed in a grid 3
columns wide, or at least with each number in its own cell, without me having
to manually separate them. Also the method you described shows the result in
1 column with each number separated by a comma. Hope this explains my problem
better.
 
B

Bob Umlas

If that string is in A1:

Sub Splitto3()
part1 = Split(Range("A1").Value, " ")
For i = LBound(part1) To UBound(part1)
part2 = Split(part1(i), ",")
For j = LBound(part2) To UBound(part2)
Cells(i + 1, j + 1).Value = part2(j)
Next
Next
End Sub

HTH
Bob Umlas
Excel MVP
 
D

dlw

if the data is in a file, put a .csv at the end of the file name and open it,
does that get you close?
 
Top