..... and post a reply a little sooner than the last !

Moderator: 2020vision
by Fixador » Fri Jun 20, 2008 10:27 am
by Fixador » Fri Jun 20, 2008 12:10 pm
e.g. if you had 2 ranked at 1 the new values would be 1.01 and 1.02
Private Sub CommandButton1_Click()
'------------from GeorgeUK---------------------------------
Dim firstmin As Range, scndmin As Range, thrdmin As Range, myrange As Range
Dim z As Range, x As Integer, y As Integer
Dim sht As Worksheet
Set sht = ThisWorkbook.Worksheets(1)
'---------------------------------------------------------------------------------
Set myrange = sht.Range("a1:a8") 'if Col A range has the odds
For Each z In myrange
If WorksheetFunction.IsNumber(z.Value) = True Then
x = WorksheetFunction.Rank(z.Value, myrange, 1)
For y = 1 To 8 Step 1
If x = y Then
sht.Cells(x, 2) = z ' this returns the Odds in descending order
End If
Next y
'---------------------------------
If x = 1 Then
Set firstmin = z: Cells(10, 8) = z
End If
If x = 2 Then
Set scndmin = z: Cells(11, 8) = z
End If
If x = 3 Then
Set thrdmin = z: Cells(12, 8) = z
End If
End If
Next z
by Fixador » Fri Jun 20, 2008 12:24 pm
For i = 1 To 8 Step 1
If Cells(i, 2) = "" Then
Cells(i, 3) = Cells(i - 1, 2)
Else:
Cells(i, 3) = Cells(i, 2)
End If
Next i
by Fixador » Fri Jun 20, 2008 12:43 pm
Private Sub CommandButton2_Click()
'------------from GeorgeUK---------------------------------
Dim firstmin As Range, scndmin As Range, thrdmin As Range, myrange As Range
Dim z As Range, x As Integer, y As Integer
Dim FirstFavRuns As Integer, SecFavRuns As Integer, ThirdFavRuns As Integer
Dim sht As Worksheet, i As Integer, counter As Single
Set sht = ThisWorkbook.Worksheets(1)
'---------------------------------------------------------------------------------
Range("B1:c8").ClearContents
Set myrange = sht.Range("a1:a8") 'if Col A range has the odds
counter = 0
For Each z In myrange
If WorksheetFunction.IsNumber(z.Value) = True Then
x = WorksheetFunction.Rank(z.Value, myrange, 1)
For y = 1 To 8 Step 1
If x = y Then
'sht.Cells(x, 2) = z ' this returns the Odds in descending order
sht.Cells(y, 2) = x ' this returns the RANK number - whoops !
End If
Next y
'---------------------------------
If x = 1 Then
Set firstmin = z: Cells(10, 8) = z
End If
If x = 2 Then
Set scndmin = z: Cells(11, 8) = z
End If
If x = 3 Then
Set thrdmin = z: Cells(12, 8) = z
End If
End If
Next z
For i = 1 To 8 Step 1
If Cells(i, 2) = "" Then
Cells(i, 3) = Cells(i - 1, 2)
Else:
Cells(i, 3) = Cells(i, 2)
End If
Next i
by Fixador » Fri Jun 20, 2008 12:53 pm
by Fixador » Fri Jun 20, 2008 1:20 pm
Private Sub CommandButton1_Click()
Dim firstmin As Range, scndmin As Range, thrdmin As Range, myrange As Range
Dim x As Integer, y As Integer
Dim FirstFavRuns As Integer, SecFavRuns As Integer, ThirdFavRuns As Integer
Dim sht As Worksheet, i As Integer, counter As Single
Set sht = ThisWorkbook.Worksheets(1)
'---------------------------------------------------------------------------------
Range("B1:f8").ClearContents
Set myrange = sht.Range("a1:a8") 'if Col A range has the odds
counter = 0
For i = 1 To 8 Step 1
If WorksheetFunction.IsNumber(i) = True Then
x = WorksheetFunction.Rank(Cells(i, 1), myrange, 1) 'x is the Rank No.
sht.Cells(i, 2) = x
End If
Next i
'-------------------------------------------------------------------------------------
'fill in the blank cells - do it in ColC so can see wot happens
For i = 1 To 8 Step 1
If Cells(i, 2) = "" Then
Cells(i, 3) = Cells(i - 1, 2)
Else:
Cells(i, 3) = Cells(i, 2)
End If
Next i
'-------------------------------------------------------------------------------------
'now (1) generate the increment ( as reminder )
'(2) Increment the RANKings
For i = 1 To 8 Step 1
If WorksheetFunction.IsNumber(sht.Cells(i, 3)) = True Then ' check RANKed Odds are a number
sht.Cells(i, 4) = counter + 0.01 'to show the incrementing
sht.Cells(i, 5) = sht.Cells(i, 3) + counter ' RANK this Col below
counter = counter + 0.01
End If
Next i
End Sub
Then rank on these unique values and you have your ranking
by Fixador » Fri Jun 20, 2008 1:34 pm
Private Sub CommandButton2_Click()
Dim firstmin As Range, scndmin As Range, thrdmin As Range, myrange As Range
Dim x As Integer, y As Integer
Dim FirstFavRuns As Integer, SecFavRuns As Integer, ThirdFavRuns As Integer
Dim sht As Worksheet, i As Integer, counter As Single
Set sht = ThisWorkbook.Worksheets(1)
'---------------------------------------------------------------------------------
Range("B1:f8").ClearContents
Set myrange = sht.Range("a1:a8") 'if Col A range has the odds
counter = 0
For i = 1 To 8 Step 1
If WorksheetFunction.IsNumber(sht.Cells(i, 1)) = True Then
x = WorksheetFunction.Rank(sht.Cells(i, 1), myrange, 1) 'x is the Rank No.
sht.Cells(i, 2) = x
End If
Next i
'-------------------------------------------------------------------------------------
'fill in the blank cells - do it in ColC so can see wot happens
For i = 1 To 8 Step 1
If Cells(i, 2) = "" Then
Cells(i, 3) = Cells(i - 1, 2)
Else:
Cells(i, 3) = Cells(i, 2)
End If
Next i
'-------------------------------------------------------------------------------------
'now (1) generate the increment ( as reminder )
'(2) Increment the RANKings
For i = 1 To 8 Step 1
If WorksheetFunction.IsNumber(sht.Cells(i, 3)) = True Then ' check RANKed Odds are a number
sht.Cells(i, 4) = counter + 0.01 'to show the incrementing
sht.Cells(i, 5) = sht.Cells(i, 3) + counter ' RANK this Col below
counter = counter + 0.01
End If
Next i
'-------------------------------------------------------------------------------------
'rank the rankings ??????
Set myrange = sht.Range("e1:e8") 'if Col E range has the prior Rankings
For i = 1 To 8 Step 1
If WorksheetFunction.IsNumber(sht.Cells(i, 5)) = True Then
x = WorksheetFunction.Rank(sht.Cells(i, 5), myrange, 1) 'x is the Rank No.
sht.Cells(i, 6) = x
End If
Next i
'-------------------------------------------------------------------------------------
'Col F has my unique rankings
'############## so list first 3 favs #####################
For i = 1 To 3 Step 1
For y = 1 To 8 Step 1
If sht.Cells(y, 6) = i Then
sht.Cells(y, 8) = i
End If
Next y
Next i
End Sub
by dgs2001 » Sat Jun 21, 2008 3:59 pm
My data : From A1 down the Col : 3.8, 5.1, 4.6, 4.6, 21, 44, 27, 120
by Fixador » Sat Jun 21, 2008 5:17 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.