specific format of a file from a TXT file to excel

gbarnoy

New Member
Joined
Mar 13, 2014
Messages
1
hey all, hopefully you can help me with this. I will be having a series of TXT report files coming my way that are arranged in a certain, uncomfortable way. This is how they look below.



1 REPORT : XXXXX COMPANY X PAGE: 1
RUN DATE: 03/13/2014
RUN TIME: 07:43:30 XXX-XX-XXXX,
- CORPORATION NUMBER - 11S
LIST OF NUMBERS WITH 0169 TYPE
0
XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX
XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX
XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX
XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX
XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX
XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX
XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX
XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX
XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX
0 TOTAL FOR 0169 TYPE = 43
1 REPORT : XXXXX Something Something Something PAGE: 1
RUN DATE: 03/13/2014
RUN TIME: 07:43:30
- COMPANY NUMBER - XXS
LIST OF NUMBERS WITH 5811 TYPE
0
XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX
XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX
XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX
XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX
XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX
XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX
XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX
XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX
XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX
0 TOTAL FOR 5811 TYPE = 43
1 REPORT : XXXXX COMPANY X PAGE: 1
RUN DATE: 03/13/2014
RUN TIME: 07:43:30
- CORPORATION NUMBER - XXS
LIST OF NUMBERS WITH 7001 TYPE
0
XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX, XXX-XX-XXXX
XXX-XX-XXXX
0 TOTAL FOR 7001 TYPE = 6


If you can advise on how to do it, I would like to have it arranged by the following:
1) simple division into 3 parts - type 0169 list, type 5811 list, and everything that starts with 7XXX type list
2)XXX-XX-XXXX represent numbers. I would like to have them without any commas or hiphens.
3) there could be more than 3 tables and they could appear in different sizes

Appreciate any help!
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

Forum statistics

Threads
1,215,328
Messages
6,124,299
Members
449,149
Latest member
mwdbActuary

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