Hello,
I have a flatfile (pos.txt) of Purchase Orders that need to modify for Integration purposes.
Example
P12345 Customer1
Line Item 1 $30 Pst Gst
Line Item 2 $45 Pst Gst
P12344 Customer344
Line Item 1 $345 Pst Gst
P14432 Customer224
Line Item 1 $32 Pst Gst
Line Item 2 $67 Pst Gst
Line Item 3 $889 Pt Gst
Line Item 4 $443 Pst Gst
I need the macro to do a loop to end of the flat file that will put the PO number to the beginning of each line below it until it reaches the next PO number. The result I am looking for is:
P12345 Customer1
P12345 Line Item 1 $30 Pst Gst
P12345 Line Item 2 $45 Pst Gst
P12344 Customer344
P12344 Line Item 1 $345 Pst Gst
P14432 Customer224
P14432 Line Item 1 $32 Pst Gst
P14432 Line Item 2 $67 Pst Gst
P14432 Line Item 3 $889 Pt Gst
P14432 Line Item 4 $443 Pst Gst
Note - each PO will have a minimum of 1 Line item but could have be up to 15 or 20.
Also after each PO number inserted, I also need to insert a Tab delimited character.
Any help would be appreciated.
Thanks
JOhn
I have a flatfile (pos.txt) of Purchase Orders that need to modify for Integration purposes.
Example
P12345 Customer1
Line Item 1 $30 Pst Gst
Line Item 2 $45 Pst Gst
P12344 Customer344
Line Item 1 $345 Pst Gst
P14432 Customer224
Line Item 1 $32 Pst Gst
Line Item 2 $67 Pst Gst
Line Item 3 $889 Pt Gst
Line Item 4 $443 Pst Gst
I need the macro to do a loop to end of the flat file that will put the PO number to the beginning of each line below it until it reaches the next PO number. The result I am looking for is:
P12345 Customer1
P12345 Line Item 1 $30 Pst Gst
P12345 Line Item 2 $45 Pst Gst
P12344 Customer344
P12344 Line Item 1 $345 Pst Gst
P14432 Customer224
P14432 Line Item 1 $32 Pst Gst
P14432 Line Item 2 $67 Pst Gst
P14432 Line Item 3 $889 Pt Gst
P14432 Line Item 4 $443 Pst Gst
Note - each PO will have a minimum of 1 Line item but could have be up to 15 or 20.
Also after each PO number inserted, I also need to insert a Tab delimited character.
Any help would be appreciated.
Thanks
JOhn