Hello all, Have a need for some code to add in a counter?
Let me try to explain and maybe there is a better way to do it.
I have a tremendous amount of data, an average of 46,000 KB on each file in .RTF (Rich Text Format). I did find some code that helps me parse it into Excel by allowing me to set the maximum number of lines I can put on one workbook and then add a new workbook to continue the import filling into one workbook after another until all the data is imported. The way the original data is set up it is hard to work with, it isn't set up very well as you will see in the sample below. I have been able to use some simple formulas to extract the info on to one line so I can later do a sum-total for each person on the file. From the 60,000+ records on each worksheet I can get convert that into about 5,000 lines. However the problem, because the import stops at the predetermined counter number I quite often have a persons information on two workbooks. I would like to be able to pause the import at some point other than just the line counter alone and use the word "Northern Trust" or something so I don't pick up some participant information on the end of one file and conclude it on the top of another. I was thinking of a second counter in conjunction with the first so that the code does something like Count1 = "When row > 65,500 AND Count2 = "Northern Trust" > some count ( for example I did a countif and found 1,158 occurrences of "NORTHERN TRUST" on the file I have already imported. . I would eventually like to automate combining the workbooks together later and I could probably to try and fit all the data on one workbook. I'm thinking it is easier to do the sub totals now on 5,000 lines of data instead of trying to do it on 65,000 lines after I have combined them. Any help or direction on this effort would be greatly appreciated.
</span><span class="gensmall"></span></td></tr></table></td></tr><tr><td class="row1" width="150" align="left" valign="middle"><span class="nav">Back to top</span></td><td class="row1" width="100%" height="28" valign="bottom" nowrap="nowrap"><table cellspacing="0" cellpadding="0" border="0" height="18" width="18"><tr>
Let me try to explain and maybe there is a better way to do it.
I have a tremendous amount of data, an average of 46,000 KB on each file in .RTF (Rich Text Format). I did find some code that helps me parse it into Excel by allowing me to set the maximum number of lines I can put on one workbook and then add a new workbook to continue the import filling into one workbook after another until all the data is imported. The way the original data is set up it is hard to work with, it isn't set up very well as you will see in the sample below. I have been able to use some simple formulas to extract the info on to one line so I can later do a sum-total for each person on the file. From the 60,000+ records on each worksheet I can get convert that into about 5,000 lines. However the problem, because the import stops at the predetermined counter number I quite often have a persons information on two workbooks. I would like to be able to pause the import at some point other than just the line counter alone and use the word "Northern Trust" or something so I don't pick up some participant information on the end of one file and conclude it on the top of another. I was thinking of a second counter in conjunction with the first so that the code does something like Count1 = "When row > 65,500 AND Count2 = "Northern Trust" > some count ( for example I did a countif and found 1,158 occurrences of "NORTHERN TRUST" on the file I have already imported. . I would eventually like to automate combining the workbooks together later and I could probably to try and fit all the data on one workbook. I'm thinking it is easier to do the sub totals now on 5,000 lines of data instead of trying to do it on 65,000 lines after I have combined them. Any help or direction on this effort would be greatly appreciated.
temp_5.txt | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | |||
34 | \par | NORTHERN TRUST | ||||||||||
35 | \par | BENEFIT PAYMENTS | ANNUAL STATEMENT | OF PAYMENTS REPO | RT BY | ALPHA LAST | NAME | DATE | 1/14/2005 | |||
36 | \par | REPORT ID BPP425-ASP | *HONEYWELL* | PROGRAM | ID BPPB250R | |||||||
37 | \par | CLIENT 0018 | HONEYWELL | PAGE | 19,705 | |||||||
38 | \par | PLAN AB5 | FRO | M 1/01/2004 - 12 | /31/2 | 4 | ||||||
39 | \par | |||||||||||
40 | \par | PARTICIPANT NAME | SSN | PAYMT REF# | ||||||||
41 | \par | HOME ADDRESS | PART ID | PAYMT DATE | PAYMT | TYPE | W/H & DED | |||||
42 | \par | PAYMENT/ADVICE ADDRESS | RETIRE DATE | FUNDING SOURCE | AMOUN | T | TAXATION | AMOUNT | ||||
43 | \par | ___________________________________ | _____________________________ | _________________ | _____ | ____________ | ______________ | ___________ | _______________ | ____________ | ||
44 | \par | Public, John Q. | 5/3/2004 | CHECK | 5146845 | |||||||
45 | \par | 123 any where | 123-45-6789 | BENEFIT | 999.83 | FEDERAL | 0 | NET AMOUNT | 789.37 | |||
46 | \par | any town, any city zip | 123456789 | GROSS AMOUNT | 999.83 | GA STATE | 0 | |||||
47 | \par | 10/1/2002 | BASMED | 210.46 | ||||||||
48 | \par | DIST CODE 7 | TOTAL | 210.46 | ||||||||
49 | \par | |||||||||||
50 | \par | ORDINC | 999.83 | TAXABLE | 999.83 | |||||||
51 | \par | NONTAXABLE | 0 | |||||||||
52 | \par | ___________________________________ | _____________________________ | _________________ | _____ | ____________ | ______________ | ___________ | _______________ | ____________ | ||
53 | \par | Public, John Q. | 6/1/2004 | CHECK | 5691750 | |||||||
54 | \par | 123 any where | 123-45-6789 | BENEFIT | 999.83 | FEDERAL | 0 | NET AMOUNT | 789.37 | |||
55 | \par | any town, any city zip | 123456789 | GROSS AMOUNT | 999.83 | GA STATE | 0 | |||||
56 | \par | 10/1/2002 | BASMED | 210.46 | ||||||||
57 | \par | DIST CODE 7 | TOTAL | 210.46 | ||||||||
58 | \par | |||||||||||
59 | \par | ORDINC | 999.83 | TAXABLE | 999.83 | |||||||
60 | \par | NONTAXABLE | 0 | |||||||||
61 | \par | ___________________________________ | _____________________________ | _________________ | _____ | ____________ | ______________ | ___________ | _______________ | ____________ | ||
62 | \par | Smith, John | 7/1/2004 | CHECK | 6283632 | |||||||
63 | \par | 105 my street | 3456-78-9012 | BENEFIT | 999.83 | FEDERAL | 0 | NET AMOUNT | 789.37 | |||
64 | \par | new town NJ zip | 3456789012 | GROSS AMOUNT | 999.83 | GA STATE | 0 | |||||
65 | \par | 10/1/2002 | BASMED | 210.46 | ||||||||
66 | \par | DIST CODE 7 | TOTAL | 210.46 | ||||||||
67 | \par | |||||||||||
68 | \par | ORDINC | 999.83 | TAXABLE | 999.83 | |||||||
69 | \par | NONTAXABLE | 0 | |||||||||
70 | \par | ___________________________________ | _____________________________ | _________________ | _____ | ____________ | ______________ | ___________ | _______________ | ____________ | ||
71 | \par | Smith, John | 8/2/2004 | CHECK | 6775662 | |||||||
72 | \par | 105 my street | 3456-78-9012 | BENEFIT | 999.83 | FEDERAL | 0 | NET AMOUNT | 789.37 | |||
73 | \par | new town NJ zip | 3456789012 | GROSS AMOUNT | 999.83 | GA STATE | 0 | |||||
74 | \par | 10/1/2002 | BASMED | 210.46 | ||||||||
75 | \par | DIST CODE 7 | TOTAL | 210.46 | ||||||||
76 | \par | |||||||||||
77 | \par | ORDINC | 999.83 | TAXABLE | 999.83 | |||||||
78 | \par | NONTAXABLE | 0 | |||||||||
79 | \par | ___________________________________ | _____________________________ | _________________ | _____ | ____________ | ______________ | ___________ | _______________ | ____________ | ||
temp_5 |