by lindemann » Thu Sep 20, 2012 12:07 pm
Optimus,
I'm not a VBA expert but I can copy and paste with the best of them. This piece of code (written by Gary I think) puts time in play into Cell T1 so you can trigger your bets using =IF(T1>20,.......etc
Dim timeInPlay As Date
Dim turnedInPlay As Boolean
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Columns.Count = 16 Then
If Range("E2").Value = "In Play" Then
If Not turnedInPlay Then
turnedInPlay = True
timeInPlay = Now
End If
Else
turnedInPlay = False
End If
If turnedInPlay Then Range("T1").Value = DateDiff("s", timeInPlay, Now) Else Range("T1").Value = 0
End If
End Sub