Moderator: 2020vision
by Toma » Fri Jun 22, 2018 11:06 pm
by alrodopial » Sat Jun 23, 2018 10:20 am
Dim storedRace As String
Private Sub Worksheet_Change(ByVal Target As Range)
Dim r As Integer, triggerRow As Integer
If Target.Columns.Count = 16 Then
If Target(1, 1) = "" Then Exit Sub
If Target(1, 1) <> storedRace Then
Application.EnableEvents = False
With ThisWorkbook.Worksheets("Triggers")
For r = 5 To 54
'If Cells(r, 25) <> "" Then
triggerRow = Cells(r, 25) + 1
.Range(.Cells(triggerRow, 1), .Cells(triggerRow, 3)).Copy Range(Cells(r, 17), Cells(r, 19))
If Cells(r, 17) = "CANCEL-ALL" Then Cells(r, 20) = "ALL" Else Cells(r, 20) = ""
If Cells(r, 17) = "" Then Cells(r, 25) = "" Else Cells(r, 25) = triggerRow
'End If
Next
End With
storedRace = Target(1, 1)
End If
Application.EnableEvents = True
End If
End Sub
by Toma » Sat Jun 23, 2018 2:04 pm
by Toma » Sat Jun 23, 2018 2:15 pm
by alrodopial » Sat Jun 23, 2018 4:44 pm
Dim storedRace As String
Dim maxTriggersInRow As Integer
Dim triggerRow As Integer
Private Sub Worksheet_Change(ByVal Target As Range)
Dim r As Integer
If Target.Columns.Count = 16 Then
If Target(1, 1) = "" Then Exit Sub
If Target(1, 1) <> storedRace Then
Range("Q5:U54").ClearContents
maxTriggersInRow = ThisWorkbook.Worksheets("Triggers").Range("A" & Rows.Count).End(xlUp).Row
If maxTriggersInRow <= 1 Then Exit Sub
triggerRow = 1
storedRace = Target(1, 1)
End If
If triggerRow <= maxTriggersInRow - 1 Then
triggerRow = triggerRow + 1
Application.EnableEvents = False
With ThisWorkbook.Worksheets("Triggers")
For r = 5 To 54
If Cells(r, 1) = "" Then Exit For
.Range(.Cells(triggerRow, 1), .Cells(triggerRow, 3)).Copy Range(Cells(r, 17), Cells(r, 19))
If Cells(r, 17) = "CANCEL-ALL" Then Cells(r, 20) = "ALL" Else Cells(r, 20) = ""
Next r
End With
Application.EnableEvents = True
End If
End If
End Sub
by Toma » Sat Jun 23, 2018 6:44 pm
by Toma » Sun Jun 24, 2018 7:06 am
by vulturesquad » Thu Dec 31, 2020 4:45 pm
alrodopial wrote:the bellow should be ok
headers in sheet "Triggers" must not be cleared
- Code: Select all
Dim storedRace As String
Dim maxTriggersInRow As Integer
Dim triggerRow As Integer
Private Sub Worksheet_Change(ByVal Target As Range)
Dim r As Integer
If Target.Columns.Count = 16 Then
If Target(1, 1) = "" Then Exit Sub
If Target(1, 1) <> storedRace Then
Range("Q5:U54").ClearContents
maxTriggersInRow = ThisWorkbook.Worksheets("Triggers").Range("A" & Rows.Count).End(xlUp).Row
If maxTriggersInRow <= 1 Then Exit Sub
triggerRow = 1
storedRace = Target(1, 1)
End If
If triggerRow <= maxTriggersInRow - 1 Then
triggerRow = triggerRow + 1
Application.EnableEvents = False
With ThisWorkbook.Worksheets("Triggers")
For r = 5 To 54
If Cells(r, 1) = "" Then Exit For
.Range(.Cells(triggerRow, 1), .Cells(triggerRow, 3)).Copy Range(Cells(r, 17), Cells(r, 19))
If Cells(r, 17) = "CANCEL-ALL" Then Cells(r, 20) = "ALL" Else Cells(r, 20) = ""
Next r
End With
Application.EnableEvents = True
End If
End If
End Sub
by vulturesquad » Thu Dec 31, 2020 4:48 pm
alrodopial wrote:the bellow should be ok
headers in sheet "Triggers" must not be cleared
- Code: Select all
Dim storedRace As String
Dim maxTriggersInRow As Integer
Dim triggerRow As Integer
Private Sub Worksheet_Change(ByVal Target As Range)
Dim r As Integer
If Target.Columns.Count = 16 Then
If Target(1, 1) = "" Then Exit Sub
If Target(1, 1) <> storedRace Then
Range("Q5:U54").ClearContents
maxTriggersInRow = ThisWorkbook.Worksheets("Triggers").Range("A" & Rows.Count).End(xlUp).Row
If maxTriggersInRow <= 1 Then Exit Sub
triggerRow = 1
storedRace = Target(1, 1)
End If
If triggerRow <= maxTriggersInRow - 1 Then
triggerRow = triggerRow + 1
Application.EnableEvents = False
With ThisWorkbook.Worksheets("Triggers")
For r = 5 To 54
If Cells(r, 1) = "" Then Exit For
.Range(.Cells(triggerRow, 1), .Cells(triggerRow, 3)).Copy Range(Cells(r, 17), Cells(r, 19))
If Cells(r, 17) = "CANCEL-ALL" Then Cells(r, 20) = "ALL" Else Cells(r, 20) = ""
Next r
End With
Application.EnableEvents = True
End If
End If
End Sub
by alrodopial » Fri Jan 01, 2021 12:22 pm
.Range(.Cells(triggerRow, 1), .Cells(triggerRow, 3)).Copy Range(Cells(r, 17), Cells(r, 19))
Range(Cells(r, 17), Cells(r, 19)).Value = .Range(.Cells(triggerRow, 1), .Cells(triggerRow, 3)).Value
by vulturesquad » Sat Jan 02, 2021 12:29 pm
alrodopial wrote:If I got it right replace the
- Code: Select all
.Range(.Cells(triggerRow, 1), .Cells(triggerRow, 3)).Copy Range(Cells(r, 17), Cells(r, 19))
with the
- Code: Select all
Range(Cells(r, 17), Cells(r, 19)).Value = .Range(.Cells(triggerRow, 1), .Cells(triggerRow, 3)).Value
by alrodopial » Sat Jan 02, 2021 5:31 pm
by vulturesquad » Mon Jan 04, 2021 10:32 am
alrodopial wrote:I don't remember what were in the sheets but I guess you can modify the formulas in "triggers" with some if statements
to include/exclude current horse
It depends on what do you mean by "selected horse"
the fav of the race, the 5th horse, horse with known name in advance, in every race, in flat races ... etc
by alrodopial » Mon Jan 04, 2021 10:57 am
vulturesquad wrote:alrodopial wrote:I don't remember what were in the sheets but I guess you can modify the formulas in "triggers" with some if statements
to include/exclude current horse
It depends on what do you mean by "selected horse"
the fav of the race, the 5th horse, horse with known name in advance, in every race, in flat races ... etc
Selected horse would be one from my own list.
That list would be on a selectuon worksheet
Could be in any race type
The strength of Gruss Software is that it’s been designed by one of you, a frustrated sports punter, and then developed by listening to dozens of like-minded enthusiasts.
Gruss is owned and run by brothers Gary and Mark Russell. Gary discovered Betfair in 2004 and soon realised that using bespoke software to place bets was much more efficient than merely placing them through the website.
Gary built his own software and then enhanced its features after trialling it through other Betfair users and reacting to their improvement ideas, something that still happens today.
He started making a small monthly charge so he could work on it full-time and then recruited Mark to help develop the products and Gruss Software was born.
We think it’s the best of its kind and so do a lot of our customers. But you can never stand still in this game and we’ll continue to improve the software if any more great ideas emerge.