![]() |
Text to Column with fixed width in VBA
I have text file with about 300 lines items that are not delimited
but the width of each columns is fixed and do have the value. For example, cell 1 is char(1-2), cell 2 is char(2-14).... I want to be able to copy the whole thing in Excel, run a macro that split the string into the different cell. I can manually do it using the Text to Column function and setting the width one by one but it's time consuming since this import is occuring everyday. Can you help? Thanks, |
Text to Column with fixed width in VBA
Record a macro when you do it once and you'll see the code you want to use.
wrote: I have text file with about 300 lines items that are not delimited but the width of each columns is fixed and do have the value. For example, cell 1 is char(1-2), cell 2 is char(2-14).... I want to be able to copy the whole thing in Excel, run a macro that split the string into the different cell. I can manually do it using the Text to Column function and setting the width one by one but it's time consuming since this import is occuring everyday. Can you help? Thanks, -- Dave Peterson |
All times are GMT +1. The time now is 01:24 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com