• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Using TextToColumns in VBA

Raesu

Member
I have been trying to get the results of a TextToColumns function filled into an array, turn it into a vertical array, then fill a column with those values.


Temporarily I have opted to use the function, fill out a horizontal range, then cut and tranpose that range to where I want it. Just to help my own knowledge of arrays, is this possible to do? Is it much more complex and not worth changing how I currently do it? Any help is appreciated, thank you!
 
It looks like TextToColumns is a method, and not an object. This is what makes it difficult, if not impossible, to fill it directly into an array.

Now, you could use the method, and then do a Copy and Paste Special - Transpose to easily switch from horizontal to vertical. Are you doing this with a single cell, or multiple?
 
My macro loops through and does the TextToColumns method once for each cell containing text delimiters. ('If cell.Value Like "*|*" Then...'). Then I can transpose the new row. Just wanted to check if I was missing out on array functionality but this is working great. Thanks for the response.
 
Back
Top