Create VBA to create table for each row with the same start

jrbarcik

New Member
Joined
Sep 29, 2019
Messages
1
I have multiples txt files and I would like create VBA to transform txt in tables.

Example:
file_01.txt

|000|12162020|XXXXXX|
|001|421,34|0,50|210,67|
|001|523,45|0,50|261,725|
|005||

file_02.txt

|000|11162020|XXXXXX|
|001|400,00|0,50|200,00|
|001|100,00|0,50|50,00|
|005||


------Table_000-------
|Date | Name |
---------------------
|12162020| XXXXXX |
----------------------
|11162020| XXXXXX |
----------------------


------Table_001-------
|Date | Price |
---------------------
|12162020| 421,34 |
----------------------
|12162020| 261,725 |
----------------------
|11162020| 400,00 |
----------------------
|11162020| 100,00 |
----------------------

How I make VBA for create this situation? (Table_000 and Table_001)
Thanks
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

Forum statistics

Threads
1,223,893
Messages
6,175,246
Members
452,623
Latest member
cliftonhandyman

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