View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Dana DeLouis[_5_] Dana DeLouis[_5_] is offline
external usenet poster
 
Posts: 77
Default Convert a string to an array

Just one general idea...

Sub Demo()
Dim s As String
s = "item1,item2,item3,item4,item5"
[A1:A5] = WorksheetFunction.Transpose(Split(s, ","))
End Sub

--
Dana DeLouis
Using Windows XP & Office XP
= = = = = = = = = = = = = = = = =


"pk" wrote in message
...
Does anyone know an easy/efficient method for converting a
comma separated string into a single column array?

i.e. string is passed in this format:

item1,item2,item3,itemx...

I need to parse and copy into an array.

Your example code would be greatly appreciated...thanks in
advance.