I've been using VBA to do some basic repetitive tasks and use the recorder to get me started but this is beyond me. I have data in 14 to 25 columns of cells that contain 2 to 90 separate numerical strings. The strings within the cells are all delimited by spaces so my plan is to just use something like the text to columns function to split but I need to add columns for the data to flow into.
What I think I need is a VBA equivalent of X =LEN(AH6)-LEN(SUBSTITUTE(AH6," ","")) that counts the number of spaces and therefore strings I have in the cell, that number can then be entered into a for, next statement to loop through the insertcolumns function.
My questions are then
1. how do I do the above function in VBA and
2. How do I put the result into the For count = 1 to X statement
I’d like help on this bit first then I’ll figure out why the rest of the plan wont work.
Thanks
Bookmarks