troubleshooting Question

Automate betting on Trifectas and Superfectas

Microsoft OfficeMicrosoft ExcelMicrosoft Applications
First of all, I live in a state where I can bet online.  There is nothing illegal about this.  I have attached a Worksheet that shows an example of a race and the structure that would be bet.
There might be 8 races, 9 races, 10 races up to 14 races from this sheet.  This is just an example of 1 race.  I want to send this bet to a TEXT file on the Desktop in the structure.
I would like to be able to send all the bets for all races for the day.  There may be a race that will not be bet.  In other words, I might bet 9 races of a 10 race card, having skipped maybe the 5th race or some other race.  Here is the bet structure I need:

2008-12-29,PEN,2,SUPERFECTA,(3;4)-(1;3;4;6;7)-(1;3;4;5;6;7;10)-(1;3;4;5;6;7;8;10),1,,WHEEL
2008-12-29,PEN,2,TRIFECTA,(3;4)-(1;3;4;6;7)-(1;3;4;5;6;7;10),1,,WHEEL
Please note that between the 1 and wheel is a field that needs to be blank as indicated by the , ,

The betting amounts might change from race to race.  This particular bet has a bet of \$1.

Any number in the "spot" that has a 1 will be in the first as indicated by (3:4).  3 or 4 are the program numbers to bet.  Any number in "spot" that is 1 or 2 will be in the second position as indicated by (1:3;4;6;7) and then the numbers for the 3rd position (trifectas) and 4th position (superfecta).  You get the picture.  These are 2 separate types of bets - trifecta and superfecta.
Bets.xls
Join the community to see this answer!
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.