Could someone help me with some coding
This is not at all clear - remember we haven't seen this
before.
Show us a clean example of what the lines look like then
show us cleanly how you'd like them to appear. Your
example is a little confusing and nowhere do I see ""C"
or "D" nor how the lines relate.
Patrick Molloy
Microsoft Excel MVP
-----Original Message-----
If you paste everything below into a text file i hope it
makes sense!
If there is an occurance of the unique coding 9XXX01
010100001 2999 in any line, i need 2 entries by the form
of another two lines to mirror as a credit and debit, or
debit and credit. The letter D and C after 90721722
represents debit or credit.
first line of data has to be in the exact format as the
original line except for a debit (C) replaced by a (D)
and
the amount (90721722) in this case................
directly below
.................moved to here.
Where
the number ends this is the last decimal place for any
number. All the other data has to remain.
I then need another line exactly identical as the
original
line but with the 9XXX01 replaced with 9J3501.
ie -
This is both sides of the original debit and credit entry
GECC LLAS INTERFACE 31-MAR-20049XXX01
6010 010100001
2900
90721722
90721722D0000000000000003103Susp
Rfnd/ 000000000
GECC LLAS INTERFACE 31-MAR-20049XXX01
6010 010100001
2999
90721722
90721722C0000000000000003103Susp
Rfnd/ 000000000
THis is what i would need additionally produced
GECC LLAS INTERFACE 31-MAR-20049XXX01
6010 010100001
2999
90721722
90721722D0000000000000003103Susp
Rfnd/ 000000000
GECC LLAS INTERFACE 31-MAR-20049J3501
6010 010100001
2999
90721722
90721722C0000000000000003103Susp
Rfnd/ 000000000
This is both sides of the original credit and debit entry
GECC LLAS INTERFACE 31-MAR-20049XXX01
6010 010100001
2999
334830
334830C0002047360000001612Gross
Paym 31IN77 000000000
GECC LLAS INTERFACE 31-MAR-20049XXX01
1800 046001002
0020
334830
334830D0002047360000001612Gross
Paym 31IN77 000000000
THis is what i would need additionally produced
GECC LLAS INTERFACE 31-MAR-20049J3501
6010 010100001
2999
334830
334830C0002047360000001612Gross
Paym 31IN77 000000000
GECC LLAS INTERFACE 31-MAR-20049XXX01
6010 010100001
2999
334830
334830D0002047360000001612Gross
Paym 31IN77 000000000
There are thosands of lines in all. I will be putting
the
macro in an excel spreadsheet and when i run it
the text file will be open and nothing else. I will need
the new data to be dumped into a new text file under
c/steve.
The original data should be unmodified.
Hope you can help.
.
|