Forum Discussion
ArdaOzguler
Nov 27, 2023Copper Contributor
Automatic Text To Column for Multiple Column
Hello Everyone, I need to find a way to use text to column feature for multiple column for a table before I use that excel book for another macro enabled excel book. I am adding the table as...
ArdaOzguler
Nov 28, 2023Copper Contributor
Hello peiyezhu,
Thank you for your response. Could you please explain it to me to apply in my situation? I am not sure that I can do it in VBA without any guidance 🙂
Thank you.
Thank you for your response. Could you please explain it to me to apply in my situation? I am not sure that I can do it in VBA without any guidance 🙂
Thank you.
peiyezhu
Nov 28, 2023Bronze Contributor
To apply the VBA code in Excel, you need to follow these steps:
1. Open the Excel workbook where you want to apply the code.
2. Press `Alt + F11` to open the Visual Basic for Applications (VBA) editor.
3. In the VBA editor, go to `Insert` in the menu and click on `Module`. This will insert a new module in the project.
4. Copy and paste the provided VBA code into the module.
5. Modify the code if necessary, such as changing the sheet name or range.
6. Close the VBA editor by clicking the close button (X) or pressing `Alt + Q`.
7. Press `Alt + F8` to open the "Macro" dialog box.
8. Select the macro name "ConvertStringToNumber" and click on the "Run" button.
The VBA code will then execute, converting the string values to number values in the specified ranges of columns A and B. Make sure to save your Excel workbook after applying the code.
1. Open the Excel workbook where you want to apply the code.
2. Press `Alt + F11` to open the Visual Basic for Applications (VBA) editor.
3. In the VBA editor, go to `Insert` in the menu and click on `Module`. This will insert a new module in the project.
4. Copy and paste the provided VBA code into the module.
5. Modify the code if necessary, such as changing the sheet name or range.
6. Close the VBA editor by clicking the close button (X) or pressing `Alt + Q`.
7. Press `Alt + F8` to open the "Macro" dialog box.
8. Select the macro name "ConvertStringToNumber" and click on the "Run" button.
The VBA code will then execute, converting the string values to number values in the specified ranges of columns A and B. Make sure to save your Excel workbook after applying the code.
- peiyezhuNov 29, 2023Bronze Contributor
another option: