Moderator: 2020vision
by ddaann » Tue Sep 07, 2010 3:23 pm
by GaryRussell » Wed Sep 08, 2010 6:42 am
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Columns.Count = 16 Then
If [A1] <> currentMarket Then
Application.EnableEvents = False
ThisWorkbook.Worksheets("sheet2").Range("Q2") = "GO:" & [N3]
ThisWorkbook.Worksheets("sheet3").Range("Q2") = "GO:" & [N3]
Application.EnableEvents = True
End If
currentMarket = [A1]
End If
End Sub
by ddaann » Wed Sep 08, 2010 6:45 pm
by GaryRussell » Thu Sep 09, 2010 2:13 am
dejanuk wrote:One slight problem Gary, as you can expect from Excel newbie like myself. This worked great on blank excel sheets, however on my sheet I already have one sub Worksheet_Change, and there is error message if i put them together. If i put your code in Sheet1 module nothing happens. Can you suggest something please. BTW I tried putting GO: with market id from sheet1 in q2 of sheet2, but for some reason formula gets deleted from q2 after one market change.
Many thanks
Dan
by ddaann » Tue Sep 21, 2010 2:29 pm
Option Explicit
Dim currentMarket As String
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
updating = False
If Target.Columns.Count = 16 Then
If [A1] <> currentMarket Then
Application.EnableEvents = False
ThisWorkbook.Worksheets("sheet2").Range("Q2") = "GO:" & [N3]
Application.EnableEvents = True
End If
currentMarket = [A1]
End If
End Sub
by GaryRussell » Tue Sep 21, 2010 5:15 pm
Option Explicit
Dim currentMarket As String
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Columns.Count = 16 Then
Application.EnableEvents = False
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 [A1] <> currentMarket Then
ThisWorkbook.Worksheets("sheet2").Range("Q2") = "GO:" & [N3]
End If
currentMarket = [A1]
Application.EnableEvents = True
End If
End Sub
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.