Please help.
I have a button in a sheet that I would like to press and then it would run VBA code to convert a whole column (for example, column E) containing numbers to text and leaving them in the same column, in their original place.
The manual way is:
1. Select a range (this could be a whole row or the whole column or part of it)
2. Go to the DATA tab on the ribbon
3. Click on "Text to Column"
4. Choose "Delimited" and click Next
5. For Delimiters:
- uncheck all
- text qualifier: *
- then click Next
6. For Column data format select "Text" and for Destination leave the default which is the selected range
7. Click on Finish.
This manual way converts all the numbers in the column to text leaving them in place. I do not need them moved anywhere nor split. I need them to stay where they are, in the source column, simply converted to text using this "Text to Column" feature of Excel and looking the same way as before the conversion (if 1025632, then after conversion 1025632 but as text).
So, I need to automate this manual process by having a button that when pushed will do the whole thing in one go (using VBA). I'm hoping the solution will be "self-contained" so it will not interfere with other existing VBA code in the sheet.
See here for an example: https://www.automateexcel.com/vba/text-to-columns/
I just can't find a way to modify their code to work with a button which when pressed will be applied in-place, leaving them in the source column (or row, or selection).
I hope I made sense.
Thank you.
Bookmarks