View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Tatsujin Tatsujin is offline
external usenet poster
 
Posts: 25
Default Split up or delineate data

try:

Dim myStr As String
Dim varData As Variant

myStr = "ant,antique,art,bee,beautiful,bored,chores,dancin g,daytime"
varData = Split(myStr, ",")
Range("A1").Resize(UBound(varData) + 1) = Application.Transpose(varData)

That basically just copied the string into column A. What I meant was, I was also thinking about a solution that doesn't involve spreadsheet cells.

For example, if

myStr = "ant,antique,art,bee,beautiful,bored,chores,dancin g,daytime"

then the output should be:

myStr2 = "--A--,ant,antique,art,--B--,bee, etc.."

But, I'm happy with your initial solution.

Thanks!