How would that work?
I don’t want to use the wizard, I want to do it using VBA.
I have a column of names, first, middle, last, some with suffix (Jr, Sr)
Some of the names have multiple middle names (full names or initials)
Some sure names have 2 parts (Van der lay, de Novo).
When doing txt-to-column all I need is space, but because the number of resulting columns can be from 5 to 8 in number, I risk deleting the data in the next columns that is associated with each name.
I have set up my Sub to just add columns first, but I thought there might be something more elegant and/or efficient.
In VBA, the easiest fastest solution will be to count the number of separators (or the number of columns), insert the appropriate number of columns, then run the wizard.
If you’re counting spaces, the following code would get it the max number of spaces:
Another option without sheet insertion would be: