Advanced excel: column breaks every n characters (text to columns, fixed width)

mrNeedHelpNow

New Member
Joined
Jul 20, 2018
Messages
1
Hello dear MrExcel community,

I have stumbled upon a problem that for me is really hard to resolve.
Problem is that I have a file in .txt format, after I open it with excel I need to get columns with it with Text To Columns option.

The thing is, fixed width needs to be selected and then you have to manually insert column breaks on certain characters.

The length is over 1600 characters, so manually doing this wont help.

I would need a script or something similar.

I have a mapping according to where this needs to be done:

For example:

1st column =
Position from charPosition to charfield length char
188

<colgroup><col><col><col></colgroup><tbody>
</tbody>


and so on.

can this be done with a script ?

Thanks,

Your friend who needs help
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Best option is to record a macro doing the first few columns, you can then expand that for all the columns.
 
Upvote 0

Forum statistics

Threads
1,215,055
Messages
6,122,902
Members
449,097
Latest member
dbomb1414

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top