• Steven
    108
    I'm not sure if this goes here or in handicapping but I'll start here.

    My little database program crunches data from up to a years worth of races and then outputs it to a comma separated values (.csv) file that I then open in Excel and do my analysis. Once upon a time I also had an analysis program but it was extremely awkward to use and even more difficult to modify. Excel is much easier.

    So I run the program and now I have this large .csv file that I want to analyze.

    First I sort the data by surface and distance. I recorded a marco to do this but after that, I have to manually* copy all the dirt sprints, dirt routes, turf sprints, turf routes to separate sheets in order to do more specific analysis. I need a marco to do this work for me.

    I can record simple macros, like sorting by surface and distance, but in order to move dirt sprints to the DIRT SPRINTS tab, the macro has to be able to tell if column E is D(irt) or T(urf) and it has to tell if column D is greater than or equal to 1100 but less than 1760 (yards).

    While I am sure I could figure this out (given enough time), I was wondering is anyone has this already worked out and could slip me a spreadsheet with it in there?

    *I know, first world problem, right?
  • RanchWest
    324
    Could you index your database and export to 4 different CSV files?
  • Steven
    108
    I had not thought of that. I think maybe this could be done. I'll need to sit and ponder a bit and see what I can come up with but I'm still interested in the marco.
  • Dave Schwartz
    202

    How does the data get into the program to begin with?
    If you wrote that code, wouldn't be easier to do the filtering during the export process to CSV?
  • Steven
    108
    Yes I wrote the code. You and ranchwest seem to be thinking alike. I am going to look at the code and see what I can come up with.
  • Biniak
    48
    If you still have problems, I can help.
  • Steven
    108
    Thanks for the offer Biniak but I think I'm going Dave and Ranch's route. Although my first "route" was going to be a "right turn", it looks like I may have to do this with "three lefts".:rofl:
  • Dave Schwartz
    202
    If you still have problems, I can help.Biniak

    I am very enamored to people who have skills and a willingness to help.

    What are your specialties?
  • Biniak
    48
    Access, Excel, Visual Basic, Probability, Statistics...basically anything involving numbers including stocks, options, taxes. Anything I don't know I teach myself.
bold
italic
underline
strike
code
quote
ulist
image
url
mention
reveal
youtube
tweet
Add a Comment

Please register to see more

Forum Members always see the latest updates and news first. Sign up today.