Excel or database filtering

Discuss anything related to using the program (eg. triggered betting tactics)

Moderator: 2020vision

Excel or database filtering

Postby octobergirl » Fri Dec 27, 2013 6:17 pm

Apologies if this is wrong place.

In excel or any database i am looking to filter data according to price of favourites in races.

I am looking to keep all race data in place together,just creating records of races with similar priced favourites.

Grateful if anyone can help.
octobergirl
 
Posts: 44
Joined: Fri Dec 27, 2013 6:10 pm

Postby doris_day » Sat Dec 28, 2013 12:42 pm

You dont say whether you already have the excel file or database. If you have then its quite simple to sort under any column or create a pivot table. Need more info from you as to what you have in place already.
'He was looking for the card so high and wild he'd never need to deal another' - Leonard Cohen
User avatar
doris_day
 
Posts: 968
Joined: Fri Nov 02, 2007 12:34 am

Thanks for replying

Postby octobergirl » Sat Dec 28, 2013 6:45 pm

I already have excel file,which can be deported to database if necc.

Have columns for :-

Date
Course
Time
Race Type
Horse
Price

I would like to filter so that i have records for all races where the price of favourites fall within various price parameters,while keeping the prices of all the other horses in each race, and not losing them to the filter.
octobergirl
 
Posts: 44
Joined: Fri Dec 27, 2013 6:10 pm

Make myself clearer

Postby octobergirl » Sun Dec 29, 2013 9:35 am

Last paragraph in my last post was not very well written.

I want to filter races by prices of favourites.

But to keep races i want to analyse completely intact,and not to just be left with the favourites prices after filtering.

This is proving to be amazingly difficult in excel2010.

I can't find a way of linking a price to the data for a whole race.
octobergirl
 
Posts: 44
Joined: Fri Dec 27, 2013 6:10 pm

Postby osknows » Sun Dec 29, 2013 12:31 pm

Assuming the field names are in the following columns

A - Date
B - Course
C - Time
D - Race Type
E - Horse
F - Price

add the following new fields and formula to identify unique races

G - Race Key
=A2&B2&C2

H - Min Odds
{=MIN(IF(G:G=G2,F:F))}

NOTE: {} is an Array formula and entered as CTRL+SHIFT+ENTER

Then filter on column H instead of column F. If the range is very large then then the array formula is likely to be very slow. An alternative is to add the following UDF to a MODULE and use the custom function

=MINIF(criteriaRange, criteria, minValue)
=MINIF(G:G,G2,F:F)


MODULE:
Code: Select all
Option Explicit

Public Function MINIF(ByVal rngCrit As Range, _
                      ByVal sCrit As String, _
                      ByVal rngMinRng As Range) As Single
         
Dim i As Long
Dim j As Long
Dim l As Long
Dim sngmin As Single
Dim vcellval As Variant

   i = rngCrit.Column
   j = rngMinRng.Column
   For l = 1 To rngCrit.Rows.Count
      vcellval = rngCrit.Parent.Cells(rngCrit.Row + l - 1, j).Value
      If rngCrit.Parent.Cells(rngCrit.Row + l - 1, i).Value = sCrit And _
         IsNumeric(vcellval) = True Then
         If sngmin = 0 Then sngmin = vcellval
         If vcellval < sngmin Then sngmin = vcellval
      End If
     
      If sngmin <> 0 And IsEmpty(vcellval) = True Then Exit For
   Next l
   
   For l = 1 To rngCrit.Rows.Count
      vcellval = rngCrit.Parent.Cells(rngCrit.Row + l - 1, j).Value
      If rngCrit.Parent.Cells(rngCrit.Row + l - 1, i).Value = sCrit And _
         IsNumeric(vcellval) = True Then
         If rngCrit.Parent.Cells(rngCrit.Row + l - 1, j).Value < sngmin Then
            sngmin = rngCrit.Parent.Cells(rngCrit.Row + l - 1, j).Value
         End If
      End If
     
      If sngmin <> 0 And IsEmpty(vcellval) = True Then Exit For
   Next l
   
   MINIF = sngmin
End Function
User avatar
osknows
 
Posts: 946
Joined: Wed Jul 29, 2009 12:01 am

WOW!!!!!!!!!!!

Postby octobergirl » Sun Dec 29, 2013 1:15 pm

What can i say OSKNOWS ????

Amazing.

Will get back to you.

regards
octobergirl
 
Posts: 44
Joined: Fri Dec 27, 2013 6:10 pm

Postby doris_day » Sun Dec 29, 2013 7:12 pm

:D
'He was looking for the card so high and wild he'd never need to deal another' - Leonard Cohen
User avatar
doris_day
 
Posts: 968
Joined: Fri Nov 02, 2007 12:34 am


Return to Discussion

Who is online

Users browsing this forum: Bing [Bot] and 58 guests

Sports betting software from Gruss Software


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.