Hi all...
I have some code that works fine for smaller strings, but for the big ones, it's running much longer than I'd like. I'm sure there's a better way to accomplish the same thing.
I have a text string that I'd like to convert into a list of words, not sorted or anything, just put into a column, where 1 word goes in each cell. The code below splits the string on single spaces and writes into the column.
'find word count
MyWordCount = Len(MyString) - Len(Replace(MyString, " ", "")) + 1
Range("A1").Select
'generate word lists
For x = 0 To MyWordCount
ActiveCell.Offset(x, 0) = Split(MyString, " ")(x)
Next x
The strings I tested with when I got this project were 500 -1000 words, and it worked fine. But it looks like the production data will be closer to 10,000, and that slowness gets pretty painful when it has to execute 3-5 times per run.
Thanks for any help!
Bookmarks