Just a different idea using text to columns. It splits the string onto
A1:A2, then uses text to column.
Sub Demo()
'// Dana DeLouis
Dim s As String
Dim half As Long
Dim v As Variant
s = [A1]
half = ((Len(s) - Len(Replace(s, ",", vbNullString))) \ 2) + 1
[A1:A2].NumberFormat = "@"
v = Split(Replace(Replace(s, ",", ";", 1, half), ";", ",", 1, half - 1),
";")
[A1] = v(0)
[A2] = v(1)
Range("A1:A2").TextToColumns _
Destination:=Range("A1"), _
DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, _
ConsecutiveDelimiter:=False, _
Tab:=False, _
Semicolon:=False, _
Comma:=True, _
Space:=False, _
Other:=False
End Sub
--
Dana DeLouis
Using Windows XP & Office XP
= = = = = = = = = = = = = = = = =
Kevin G said:
Hello,
How would I convert a single cell string consiting of 512 values: 545, 565,
576, etc... to a range of 512 cells.
Thanks, Kevin Graham