malfisint1
New Member
- Joined
- Apr 11, 2018
- Messages
- 8
Hello,
I have a pretty complicated requirement and need some help. My business users receive a credit card file from our vendor and use this file to reconcile against data that is loaded into our financial application. The file has no column titles however has several different header identifiers. I wasn't able to attach an example of the filer as I did not see that option but I have copied it down below. Since I copied it, it will not be in it's most accurate format. I need to load this data into Excel and separate the data according to the header identifiers in separate sheets. How can I accomplish this with VBA? I am very new to VBA so any help would be greatly appreciated.
Explanation of file:
First column of file -
Header Identifier -
6 - File Header - beginning of file
8 - Transaction Header
5th column in this row has transaction identifier
03 - Employee Data
04 - Emp Card Data
05 - Purchase Transaction
09 - Purchase Detail
4 - Transaction Detail
9 - Transaction Footer - End of specific transaction identifier
5th column in this row has transaction identifier
03 - Employee Data
04 - Emp Card Data
05 - Purchase Transaction
09 - Purchase Detail
7 - File Footer - end of file
6 0000010120 00001 02082018 00 0000000000 0000000000000000 4.0 8953 0000000001 1
8 0000010120 00001 02082018 03 0000000000 0000000000000000 4.0 8953 0000000001 1
4 444444444-0000000001 4485000000000001 0010082729 02052018 02052018 00000000 02282021
4 444444444-0000000002 4485000000000002 0010082729 02052018 02052018 00000000 02282021
9 0000010120 00001 02082018 03 0000000954 0000000000000000 4.0 8953 0000000001 1
8 0000010120 00001 02082018 04 0000000000 0000000000000000 4.0 8953 0000000001 1
4 0000010120 000000000-0000604707 0010082729 COMMERCIAL CARD MCC
4 0000010120 000000000-7900001454 0010082729 VENDOR CARD
9 0000010120 00001 02082018 04 0000000954 0000000000000000 4.0 8953 0000000001 1
8 0000010120 00001 02082018 05 0000000000 0000000000000000 4.0 8953 0000000001 1
4 4485000000000001 01082018 24639238007900014302110 0000000002 08000 463923 948000338000575 TEST1 505-3414901 NM 00840 871090000 0000000000005842 0000000000005842 00840 5021 10 01052018
4 4485000000000002 01252018 24270748024017858107025 0000000001 08001 427074 39300981878357 TEST2 610-2688620 PA 00840 193110000 0000000000059413 0000000000059413 00840 1799 10 01242018
9 0000010120 00001 02082018 05 0000000010 0000000000314465 4.0 8953 0000000001 1
8 0000010120 00001 02082018 09 0000000000 0000000000000000 4.0 8953 0000000001 1
4 4485000000000002 01312018 24435658030036006978678 0000000007 0 01282018 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 002 0000000000000000 259663 0000000000014869 01302018 3695
9 0000010120 00001 02082018 09 0000000001 0000000000000000 4.0 8953 0000000001 1
7 0000010120 00001 02082018 00 0000001979 0000000000314465 4.0 8953 0000000001 1
thanks,
Linda
I have a pretty complicated requirement and need some help. My business users receive a credit card file from our vendor and use this file to reconcile against data that is loaded into our financial application. The file has no column titles however has several different header identifiers. I wasn't able to attach an example of the filer as I did not see that option but I have copied it down below. Since I copied it, it will not be in it's most accurate format. I need to load this data into Excel and separate the data according to the header identifiers in separate sheets. How can I accomplish this with VBA? I am very new to VBA so any help would be greatly appreciated.
Explanation of file:
First column of file -
Header Identifier -
6 - File Header - beginning of file
8 - Transaction Header
5th column in this row has transaction identifier
03 - Employee Data
04 - Emp Card Data
05 - Purchase Transaction
09 - Purchase Detail
4 - Transaction Detail
9 - Transaction Footer - End of specific transaction identifier
5th column in this row has transaction identifier
03 - Employee Data
04 - Emp Card Data
05 - Purchase Transaction
09 - Purchase Detail
7 - File Footer - end of file
6 0000010120 00001 02082018 00 0000000000 0000000000000000 4.0 8953 0000000001 1
8 0000010120 00001 02082018 03 0000000000 0000000000000000 4.0 8953 0000000001 1
4 444444444-0000000001 4485000000000001 0010082729 02052018 02052018 00000000 02282021
4 444444444-0000000002 4485000000000002 0010082729 02052018 02052018 00000000 02282021
9 0000010120 00001 02082018 03 0000000954 0000000000000000 4.0 8953 0000000001 1
8 0000010120 00001 02082018 04 0000000000 0000000000000000 4.0 8953 0000000001 1
4 0000010120 000000000-0000604707 0010082729 COMMERCIAL CARD MCC
4 0000010120 000000000-7900001454 0010082729 VENDOR CARD
9 0000010120 00001 02082018 04 0000000954 0000000000000000 4.0 8953 0000000001 1
8 0000010120 00001 02082018 05 0000000000 0000000000000000 4.0 8953 0000000001 1
4 4485000000000001 01082018 24639238007900014302110 0000000002 08000 463923 948000338000575 TEST1 505-3414901 NM 00840 871090000 0000000000005842 0000000000005842 00840 5021 10 01052018
4 4485000000000002 01252018 24270748024017858107025 0000000001 08001 427074 39300981878357 TEST2 610-2688620 PA 00840 193110000 0000000000059413 0000000000059413 00840 1799 10 01242018
9 0000010120 00001 02082018 05 0000000010 0000000000314465 4.0 8953 0000000001 1
8 0000010120 00001 02082018 09 0000000000 0000000000000000 4.0 8953 0000000001 1
4 4485000000000002 01312018 24435658030036006978678 0000000007 0 01282018 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 002 0000000000000000 259663 0000000000014869 01302018 3695
9 0000010120 00001 02082018 09 0000000001 0000000000000000 4.0 8953 0000000001 1
7 0000010120 00001 02082018 00 0000001979 0000000000314465 4.0 8953 0000000001 1
thanks,
Linda