Moderator: 2020vision
by mak » Fri Jan 20, 2012 8:23 pm
by alrodopial » Sat Jan 21, 2012 12:03 am
Dim previusVALUE As Double
.......
If Range("P5") <> previusVALUE Then
... copy odds
previusVALUE = Range("P5") .Value
Range("BB5:BD5") = Range("BA5:BC5")
Range("BA5") = Range("P5").Value
End If
..... your code here
by mak » Sat Jan 21, 2012 10:44 am
by alrodopial » Mon Jan 23, 2012 9:02 am
Dim TotalAmountMatchedArray() As Variant
Dim TotalAmountMatchedPREVIUSArray() As Variant
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Columns.Count = 16 Then
Application.EnableEvents = False
Lrow = Range("A55").End(xlUp).Row ' last row with data
NumberOfSelections = Lrow - 4
Set rng = Range("A5:CZ" & Lrow)
DataArray = rng
ReDim TotalAmountMatchedArray(NumberOfSelections, 1)
ReDim TotalAmountMatchedPREVIUSArray(NumberOfSelections, 1)
ReDim TempArray(1 To NumberOfSelections, 8)
Set rng = ThisWorkbook.Sheets("Market").Range("BA5:BH" & Lrow)
TempArray = rng
Set rng = Range("AE5:AE" & Lrow)
TotalAmountMatchedPREVIUSArray = rng
Set rng = Range("O5:O" & Lrow)
TotalAmountMatchedArray = rng
For i = 1 To NumberOfSelections
If TotalAmountMatchedArray(i, 1) <> TotalAmountMatchedPREVIUSArray(i, 1) Then
TempArray(i, 4) = TempArray(i, 3)
TempArray(i, 3) = TempArray(i, 2)
TempArray(i, 2) = TempArray(i, 1)
TempArray(i, 1) = TotalAmountMatchedPREVIUSArray(i, 1)
TempArray(i, 5) = DataArray(i, 53)
TempArray(i, 6) = DataArray(i, 54)
TempArray(i, 7) = DataArray(i, 55)
TempArray(i, 8) = DataArray(i, 56)
Else
TempArray(i, 5) = DataArray(i, 53)
TempArray(i, 6) = DataArray(i, 54)
TempArray(i, 7) = DataArray(i, 55)
TempArray(i, 8) = DataArray(i, 56)
End If
Next i
ThisWorkbook.Sheets("Market").Range("BA5:BH" & Lrow).Value = TempArray
Range("AE5:AE" & Lrow) = rng.Value ' Copy the values for use in the next refresh in which they will be 'the old values'
Application.EnableEvents = True
End If
End Sub
by alrodopial » Mon Jan 23, 2012 9:04 am
Dim rng As Range
Dim Lrow, NumberOfSelections, i As Integer
Dim DataArray(), TempArray() As Variant
Dim TotalAmountMatchedArray() As Variant
Dim TotalAmountMatchedPREVIUSArray() As Variant
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Columns.Count = 16 Then
Application.EnableEvents = False
Lrow = Range("A55").End(xlUp).Row ' last row with data
NumberOfSelections = Lrow - 4
Set rng = Range("A5:CZ" & Lrow)
DataArray = rng
ReDim TotalAmountMatchedArray(NumberOfSelections, 1)
ReDim TotalAmountMatchedPREVIUSArray(NumberOfSelections, 1)
ReDim TempArray(1 To NumberOfSelections, 8)
Set rng = ThisWorkbook.Sheets("Market").Range("BA5:BH" & Lrow)
TempArray = rng
Set rng = Range("AE5:AE" & Lrow)
TotalAmountMatchedPREVIUSArray = rng
Set rng = Range("O5:O" & Lrow)
TotalAmountMatchedArray = rng
For i = 1 To NumberOfSelections
If TotalAmountMatchedArray(i, 1) <> TotalAmountMatchedPREVIUSArray(i, 1) Then
TempArray(i, 4) = TempArray(i, 3)
TempArray(i, 3) = TempArray(i, 2)
TempArray(i, 2) = TempArray(i, 1)
TempArray(i, 1) = TotalAmountMatchedPREVIUSArray(i, 1)
TempArray(i, 5) = DataArray(i, 53)
TempArray(i, 6) = DataArray(i, 54)
TempArray(i, 7) = DataArray(i, 55)
TempArray(i, 8) = DataArray(i, 56)
Else
TempArray(i, 5) = DataArray(i, 53)
TempArray(i, 6) = DataArray(i, 54)
TempArray(i, 7) = DataArray(i, 55)
TempArray(i, 8) = DataArray(i, 56)
End If
Next i
ThisWorkbook.Sheets("Market").Range("BA5:BH" & Lrow).Value = TempArray
Range("AE5:AE" & Lrow) = rng.Value ' Copy the values for use in the next refresh in which they will be 'the old values'
Application.EnableEvents = True
End If
End Sub
by mak » Mon Jan 23, 2012 10:56 am
by alrodopial » Mon Jan 23, 2012 11:29 am
by mak » Mon Jan 23, 2012 11:38 am
by alrodopial » Mon Jan 23, 2012 11:55 am
by alrodopial » Mon Jan 23, 2012 12:48 pm
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Columns.Count = 16 Then
Application.EnableEvents = False
Lrow = ThisWorkbook.Sheets("Market").Range("A55").End(xlUp).Row ' last row with data
NumberOfSelections = Lrow - 4
ReDim TotalAmountMatchedArray(NumberOfSelections, 1)
ReDim TotalAmountMatchedPREVIOUSArray(NumberOfSelections, 1)
ReDim TempArray(NumberOfSelections, 8)
Set rng = ThisWorkbook.Sheets("Market").Range("BA5:BH" & Lrow)
TempArray = rng
Set rng = ThisWorkbook.Sheets("Market").Range("AE5:AE" & Lrow)
TotalAmountMatchedPREVIOUSArray = rng
Set rng = ThisWorkbook.Sheets("Market").Range("O5:O" & Lrow)
TotalAmountMatchedArray = rng
For i = 1 To NumberOfSelections
If TotalAmountMatchedArray(i, 1) <> TotalAmountMatchedPREVIOUSArray(i, 1) Then
TempArray(i, 8) = TempArray(i, 7)
TempArray(i, 7) = TempArray(i, 6)
TempArray(i, 6) = TempArray(i, 5)
TempArray(i, 5) = TempArray(i, 4)
TempArray(i, 4) = TempArray(i, 3)
TempArray(i, 3) = TempArray(i, 2)
TempArray(i, 2) = TempArray(i, 1)
TempArray(i, 1) = TotalAmountMatchedPREVIOUSArray(i, 1)
End If
Next i
ThisWorkbook.Sheets("Market").Range("BA5:BH" & Lrow).Value = TempArray
ThisWorkbook.Sheets("Market").Range("AE5:AE" & Lrow) = rng.Value ' Copy the values for use in the next refresh in which they will be 'the old values'
Application.EnableEvents = True
End If
End Sub
by alrodopial » Mon Jan 23, 2012 1:01 pm
Dim currentRACE As String
Dim rng As Range
Dim Lrow, NumberOfSelections, i As Integer
Dim TempArray() As Variant
Dim TotalAmountMatchedArray() As Variant
Dim TotalAmountMatchedPREVIOUSArray() As Variant
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Columns.Count = 16 Then
Application.EnableEvents = False
If currentRACE <> ThisWorkbook.Sheets("Market").Range("A1").Value Then
ThisWorkbook.Sheets("Market").Range("AE5:AE55,BA5:BH55").ClearContents
End If
Lrow = ThisWorkbook.Sheets("Market").Range("A55").End(xlUp).Row ' last row with data
NumberOfSelections = Lrow - 4
ReDim TotalAmountMatchedArray(NumberOfSelections, 1)
ReDim TotalAmountMatchedPREVIOUSArray(NumberOfSelections, 1)
ReDim TempArray(NumberOfSelections, 8)
Set rng = ThisWorkbook.Sheets("Market").Range("BA5:BH" & Lrow)
TempArray = rng
Set rng = ThisWorkbook.Sheets("Market").Range("AE5:AE" & Lrow)
TotalAmountMatchedPREVIOUSArray = rng
Set rng = ThisWorkbook.Sheets("Market").Range("O5:O" & Lrow)
TotalAmountMatchedArray = rng
For i = 1 To NumberOfSelections
If TotalAmountMatchedArray(i, 1) <> TotalAmountMatchedPREVIOUSArray(i, 1) Then
TempArray(i, 8) = TempArray(i, 7)
TempArray(i, 7) = TempArray(i, 6)
TempArray(i, 6) = TempArray(i, 5)
TempArray(i, 5) = TempArray(i, 4)
TempArray(i, 4) = TempArray(i, 3)
TempArray(i, 3) = TempArray(i, 2)
TempArray(i, 2) = TempArray(i, 1)
TempArray(i, 1) = TotalAmountMatchedPREVIOUSArray(i, 1)
End If
Next i
ThisWorkbook.Sheets("Market").Range("BA5:BH" & Lrow).Value = TempArray
ThisWorkbook.Sheets("Market").Range("AE5:AE" & Lrow) = rng.Value ' Copy the values for use in the next refresh in which they will be 'the old values'
currentRACE = ThisWorkbook.Sheets("Market").Range("A1").Value
Application.EnableEvents = True
End If
End Sub
by mak » Mon Jan 23, 2012 1:06 pm
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.