View Single Post
 
Old 04-03-2012, 05:33 AM
mjosic mjosic is offline Windows XP Office 2007
Novice
 
Join Date: Apr 2012
Posts: 2
mjosic is on a distinguished road
Default Spliting column with text and numbers

Hi people,

I have one problem and would very appreciate your help.

I've got a txt file with lots of data. In first column I have Country and for each country code of export product (but first on 4 digits as a category and than full codes for each product which is 8-10 digits), in second product details and in the third one export quantity. When I transfer the file into Excel, the table is following.

Country/Code Description Values in EUR

Afghanistan
3002 aaaaaaaaaaa 25.568.789
300220000 aaaaaaaaaaa 25.568.789
3005 aaaaaaaaaaa 20.145.698
300590211 aaaaaaaaaaa 5.000.000
300590311 aaaaaaaaaaa 15.145.698
8201 aaaaaaaaaaa 7.236.547
820110001 aaaaaaaaaaa 5.236.547
820110002 aaaaaaaaaaa 2.000.000
....
....
China
030371102 aaaaaaaaaaa 25.568.789
040110105 aaaaaaaaaaa 15.145.698
05040000 aaaaaaaaaaa 7.236.547
...
...
..

and smth about 100 000 rows.

The question is how to divide this first column in two columns, so the table in the end looks like this:

Country Code Description Values in EUR

Afghanistan 300220000 aaaaaaaaaaa 25.568.789
Afghanistan 300590311 aaaaaaaaaaa 15.145.698
Afghanistan 300590211 aaaaaaaaaaa 5.000.000
Afghanistan 820110002 aaaaaaaaaaa 2.000.000
Afghanistan 820110001 aaaaaaaaaaa 5.236.547
China 030371102 aaaaaaaaaaa 25.568.789
China 040110105 aaaaaaaaaaa 15.145.698
China 050400007 aaaaaaaaaaa 7.236.547

Assuming VB should do it or???

Thanks a lot!!!

Miroslav
Reply With Quote