Ken J Posted March 19, 2007 Share Posted March 19, 2007 What I need is a program that will look for a specific text line. Then take out a specific Text Numeric number and either create a excel form or just total it. I am not a programer so I am posting this where programers may know of something that will work for me.Below is a small sample of the 207 page file I have to sift threw by hand each month.The *** Total LAND __ I split out would be one of the sort lines. Then I need to remove the second number from the right end of the line. Also if it has bracketts it is a negative number.The ***Total INTANGIBLE___ would be another different total with amount of 3.69All the lines that have "TOTAL" have to split out to their separate accounts.Also another section (with different line names) have the number to total 4 from the right.Any pointers to a program to do this would be appreciatedKenNote: All Lines with *** I have spaced for clarity.ExampleActivity Month 3.82 0.00 3.82 Accepted Amount: Disputed Amount: Invoiced Amount: LAND ACQUISITIONS AND PRELIMINARY COSTS 3110.255 ACQUISITION 0.00 (48,917.60) 0.00 2.00000 0.00 0.00*** Total LAND ACQUISITIONS AND PRELIMINARY COSTS 0.00 (48,917.60) 0.00 0.00 0.00 INTANGIBLE DRILLING COSTS 3310.300 DRILLING - COSTS 0.00 3,603.77 184.80 2.00000 3.69 0.00 *** Total INTANGIBLE DRILLING COSTS 0.00 3,603.77 184.80 3.69 0.00 INTANGIBLE COMPLETION COSTS 3320.400 COMPLETION - COSTS 0.00 4,845.31 0.00 2.00000 0.00 0.00 Total INTANGIBLE COMPLETION COSTS 0.00 4,845.31 0.00 0.00 0.00 WELL RECOMPLETION & WORKOVER 3340.400 COMPLETION - COSTS 0.00 475.86 6.44 2.00000 0.13 0.00 Total WELL RECOMPLETION & WORKOVER 0.00 475.86 6.44 0.13 0.00 TANGIBLE COMPLETION 3510.500 EQUIPPING - COSTS 0.00 (65,428.96) 0.00 2.00000 0.00 0.00 Total TANGIBLE COMPLETION 0.00 (65,428.96) 0.00 0.00 0.00 Total Statement 0.00 (105,421.62) 191.24 3.82 0.00 AFEActivity Month 29.64 0.00 29.64 Accepted Amount: Disputed Amount: Invoiced Amount: LAND ACQUISITIONS AND PRELIMINARY COSTS 3110.255 ACQUISITION 0.00 1,600.00 1,600.00 1.00000 16.00 0.00 3110.265 LAND & LEASE SERVICE 0.00 1,310.65 1,310.65 1.00000 13.11 0.00 3110.271 LEASE RENTALS -FREEHOLD 0.00 53.34 53.34 1.00000 0.53 0.00 ***Total LAND ACQUISITIONS AND PRELIMINARY COSTS 0.00 2,963.99 2,963.99 29.64 0.00 Total Statement 0.00 2,963.99 2,963.99 29.64 0.00 Link to comment Share on other sites More sharing options...
Yzöwl Posted March 19, 2007 Share Posted March 19, 2007 I'm afraid we'll need more information than that.Is the date, space or tab delimited, is it ASCII textWhy have you seperated out only some of the lines beginning with Total, and not others, and how do we program that scenario into any reply.It looks like the data is exported from some sort of database /spreadsheet, if so what. It may be more efficient to have only pertinent information exported in the first instance for example. Link to comment Share on other sites More sharing options...
dAbReAkA Posted March 19, 2007 Share Posted March 19, 2007 regular expressions could do.. Link to comment Share on other sites More sharing options...
cyprod Posted March 19, 2007 Share Posted March 19, 2007 perl is your friend Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now