What I am trying to do is every morning I hand pick races where I want to Place bets in Play.
I place my races into a column like this I sheet 1
13:10
14:45
16:00
17:00
18:00
My hand picked races I will write manually in column $B$17:$B$35
In E5 I have VALUE(MID($C$1,FIND("- 1",$C$1)+2,5)) wich gives me the time of each race.
‘ in $C$1 I have the race string which I Got from the Race Matrix which is refreshing from BAssistant on Sheet2
In E6 I have IF(ISERROR(MATCH($E$5,$B$17:$B$35,0)),0,MATCH($E$5,$B$17:$B35,0)) Using this formula Excel gives me any value above 1 if the current race is in my list,0 is the current race is NOT in my list
What I want to do is for VBA to keep me moving through the day races (using the trigger on Q2 -1)placing bets ONLY in the races I have in My Column Matrix and switching to do next race once the race is suspended.If the next race is not in my matrix then move on to the next and to the next until it finds one where I want to place bets. I tried opening several tabs but since my system requires me to open TWO tabs per race sometimes I had open 20 pages at the same time which SLOWS down the software big time( a no,no since I am placing bets in Play)
This is the VBA code I put in Sheet2 and Sheet3
- Code: Select all
Private Sub Worksheet_Change(ByVal Target As Range)
If updating Then Exit Sub
updating = True
If Cells(2, 5) = "In Play" Then
If Cells(1, 27) = "" Then Cells(1, 27) = Cells(2, 3)
If Cells(1, 27) <> "" Then Cells(1, 28) = DateDiff("s", Cells(1, 27), Cells(2, 3))
End If
If Cells(2, 5) <> "In Play" And Cells(2, 6) <> "Suspended" Then
Cells(1, 27) = ""
Cells(1, 28) = ""
End If
If Cells(2, 5) = "In Play" Then
Cells(2, 18) = ""
End If
If Cells(3, 20) = 0 Then Cells(2, 18) = Cells(3, 21)’ I have -1 in Cell 3,21
If Cells(2, 6) = "Closed" Then
Cells(2, 18) = Cells(3, 21)
End If
If Cells(2, 6) = "Suspended" Then
Cells(2, 18) = Cells(3, 21)
End If
updating = False
End Sub
The very few lines of the subroutine is Garys t Start Time to code that I use to placebets in Play.
What I does is well first it kept jumpin until it came to the last race and this one doesn’t switch to the next race like it is supposed to. To the programmers out there apologies for this horrible block of coding

