+ Reply to Thread
Results 1 to 18 of 18

Plotting list with possibilty numbers for football betting, 13 matches.

  1. #1
    Registered User
    Join Date
    04-15-2023
    Location
    Stockholm
    MS-Off Ver
    OFFICE 365
    Posts
    4

    Plotting list with possibilty numbers for football betting, 13 matches.

    I?m unsuer exactly where i should upload this question.

    In sweden we have a game for every saturday where you will bet on 13 games, you will bett either 1 (home victory, x (draw) or 2(away victory). I want to create a fromula that will give me a list but the rules are that 5 games shall be "1", 4 games shall be "X", 4 games shall be "2". I thought this should be possible with VBA, but maybe there is a easy way?
    Example of plotting should look like.

    1. 11111xxxx2222
    2. 1111x1xxx2222
    3. 111121xxx2221

    Any tips are appreciate =)

  2. #2
    Forum Expert
    Join Date
    01-25-2011
    Location
    Belgium, Alveringem
    MS-Off Ver
    Excel 2003, 2007, 365
    Posts
    1,418

    Re: Plotting list with possibilty numbers for football betting, 13 matches.

    almost 1.600.000 combinaisons possible and only 90.090 meet the constraints
    Attached Files Attached Files
    Last edited by bsalv; 04-15-2023 at 09:09 AM.
    Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

  3. #3
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow Re: Plotting list with possibilty numbers for football betting, 13 matches.


    Quote Originally Posted by mr.404 View Post
    I want to create a fromula […] I thought this should be possible with VBA
    I can't see what could be a 'fromula' but as this is an Excel VBA forum section
    that can be easily achieved with a classic common instant SSS
    small VBA procedure obviously - like already demonstrated within this forum -
    but all rules must be well described, elaborated, … or you will have
    to fit it yourself for what you forgot / misexplained !
    So for example all 13 games must be unique or duplicates are allowed ?
    Attach at least a workbook with the expected result layout …
    Last edited by Marc L; 04-15-2023 at 09:59 AM.

  4. #4
    Registered User
    Join Date
    04-15-2023
    Location
    Stockholm
    MS-Off Ver
    OFFICE 365
    Posts
    4

    Re: Plotting list with possibilty numbers for football betting, 13 matches.

    Thanks bsalv, exactly what i wanted. Is there anyway i could add more rules. Example game(order) 2 should only be "x", and game(order) 11 should only be "1".


    Sry Marc L sry for my english m8. I´m will try better =). Every row shall be unique.

    I think i should at least have 4 unique values, for example "GAME"-"BET": 1-x; 4-1; 6-x; 7-2.
    Wich would for example look like this:

    1.X1112X221XX2
    2.X2212X221XX2
    Last edited by mr.404; 04-15-2023 at 10:24 AM.

  5. #5
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Question Re: Plotting list with possibilty numbers for football betting, 13 matches.


    No I was not stating for one result,
    enough clear with your original « the rules are that 5 games shall be "1", 4 games shall be "X", 4 games shall be "2" ».
    The question was according to how many draws you need but maybe you want a single draw ?
    What exact layout do you need according to Excel ?

  6. #6
    Registered User
    Join Date
    04-15-2023
    Location
    Stockholm
    MS-Off Ver
    OFFICE 365
    Posts
    4

    Re: Plotting list with possibilty numbers for football betting, 13 matches.

    The point with the excelfile its that it shall give me all posibility in form of a list.
    witch should look like this:

    S,1,X,2,1,X,2,1,X,2,1,X,2,1

    S,1,1,2,1,X,X,2,2,2,1,1,1,1

    And my main rule is 5 homevictory (1), 4 draw (X), 4 away victory (2).
    additional rule should be 4 games are uniqe. Unique games are: 2-X; 4-1; 12-1;13-1.

  7. #7
    Forum Expert
    Join Date
    01-25-2011
    Location
    Belgium, Alveringem
    MS-Off Ver
    Excel 2003, 2007, 365
    Posts
    1,418

    Re: Plotting list with possibilty numbers for football betting, 13 matches.

    hello,
    with every match in another column, you can use autofilter to apply more rules
    Attached Files Attached Files

  8. #8
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow Re: Plotting list with possibilty numbers for football betting, 13 matches.


    IMO listing all combinations has no sense except for some student homework …
    I was thinking of some draws to fill some grids like when playing some lottery game.
    As bsalv already well done the job and shared with you the way how to reduce combinations according to your new rules
    so this thread is solved !

  9. #9
    Registered User
    Join Date
    04-15-2023
    Location
    Stockholm
    MS-Off Ver
    OFFICE 365
    Posts
    4

    Re: Plotting list with possibilty numbers for football betting, 13 matches.

    Thank you bsalv,

    Thanks all for the help and have a nice day =)

  10. #10
    Forum Contributor
    Join Date
    08-06-2006
    Location
    Spain
    MS-Off Ver
    Excel 2010 32Bit
    Posts
    390

    Re: Plotting list with possibilty numbers for football betting, 13 matches.

    Quote Originally Posted by bsalv View Post
    hello,
    with every match in another column, you can use autofilter to apply more rules
    Hello,

    I was searching football VBA and found this thread interesting I have a question when I run the code it inform error 13 and highlight following line in yellow please tell me what I am doing wrong.
    Please Login or Register  to view this content.
    Regards,
    Moti

  11. #11
    Forum Expert
    Join Date
    01-25-2011
    Location
    Belgium, Alveringem
    MS-Off Ver
    Excel 2003, 2007, 365
    Posts
    1,418

    Re: Plotting list with possibilty numbers for football betting, 13 matches.

    hello,
    did you make some modifications to the macro ? Every item in the dictionary 'll be a 1-D array with 13 elements. If there is at least one with a different number, you'll have that error.
    Can you post your file ?

  12. #12
    Forum Contributor
    Join Date
    08-06-2006
    Location
    Spain
    MS-Off Ver
    Excel 2010 32Bit
    Posts
    390

    Re: Plotting list with possibilty numbers for football betting, 13 matches.

    Quote Originally Posted by bsalv View Post
    hello,
    did you make some modifications to the macro ? Can you post your file ?
    Hello bsalv, Thank you for the reply I download the file from #post2 that worked fine from #post7 is giving error I did not change anything just download and run the code.

    Here is just I created a new workbook and put the code it gives also error13 I am using excel 2000. Please check attachment below.

    Kind Regards,
    Moti
    Attached Files Attached Files
    Last edited by Motilulla; 09-30-2023 at 07:53 AM. Reason: Just change the VBA code in the standard module

  13. #13
    Forum Expert
    Join Date
    01-25-2011
    Location
    Belgium, Alveringem
    MS-Off Ver
    Excel 2003, 2007, 365
    Posts
    1,418

    Re: Plotting list with possibilty numbers for football betting, 13 matches.

    hello, how many keys do you have in that Dictionary

    you can find it by adding 1 of this lines
    Please Login or Register  to view this content.
    It's in an excel2000, I'm not sure but those files already have more then 65K lines per sheet (your example is okay with +1.048K lines) ?

  14. #14
    Forum Contributor
    Join Date
    08-06-2006
    Location
    Spain
    MS-Off Ver
    Excel 2010 32Bit
    Posts
    390

    Re: Plotting list with possibilty numbers for football betting, 13 matches.

    Quote Originally Posted by bsalv View Post
    hello, how many keys do you have in that Dictionary

    you can find it by adding 1 of this lines
    Please Login or Register  to view this content.
    It's in an excel2000, I'm not sure but those files already have more then 65K lines per sheet (your example is okay with +1.048K lines) ?
    Hello bsalv, I apologies my bad typo error I am using Excel 2010; I tried line (MsgBox Dict.Count) it says 90090.

    Please see the image attached it give me error13 and when I press debug (Depurar) it highlight line in yellow. May be I guess this line is not compatible with Excel 2010.

    Kind Regards,
    Moti
    Attached Images Attached Images

  15. #15
    Forum Expert
    Join Date
    01-25-2011
    Location
    Belgium, Alveringem
    MS-Off Ver
    Excel 2003, 2007, 365
    Posts
    1,418

    Re: Plotting list with possibilty numbers for football betting, 13 matches.

    i have no problems in excel365, so it's a guess, store the results of the dictionary in an array as intermediate step and then copy to the sheet
    Attached Files Attached Files

  16. #16
    Forum Contributor
    Join Date
    08-06-2006
    Location
    Spain
    MS-Off Ver
    Excel 2010 32Bit
    Posts
    390

    Re: Plotting list with possibilty numbers for football betting, 13 matches.

    Quote Originally Posted by bsalv View Post
    i have no problems in excel365
    Hello bsalv, sorry I am troubling you I appreciate your help I think there is some compatibility problem with excel 2010 version really it is giving me lot of problem.

    Here is the 3 screen shot after I run the code it show as follow first, second and third.

    Kind Regards,
    Moti
    Attached Images Attached Images

  17. #17
    Forum Expert
    Join Date
    01-25-2011
    Location
    Belgium, Alveringem
    MS-Off Ver
    Excel 2003, 2007, 365
    Posts
    1,418

    Re: Plotting list with possibilty numbers for football betting, 13 matches.

    another trial
    Attached Files Attached Files

  18. #18
    Forum Contributor
    Join Date
    08-06-2006
    Location
    Spain
    MS-Off Ver
    Excel 2010 32Bit
    Posts
    390

    Re: Plotting list with possibilty numbers for football betting, 13 matches.

    Quote Originally Posted by bsalv View Post
    another trial
    Hello bsalv, I am happy this runs 100% perfectly. I am grateful to you for your kind help.

    Have a good start of the week. Good Luck!

    My Best Regards,
    Moti
    Attached Images Attached Images

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 43
    Last Post: 06-29-2022, 02:50 AM
  2. [SOLVED] paste transpose football matches into rows
    By aaaaa34 in forum Excel General
    Replies: 9
    Last Post: 06-17-2022, 08:40 AM
  3. List football game combinations for betting
    By Digitalgezer2 in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 2
    Last Post: 02-07-2020, 06:24 AM
  4. [SOLVED] VBA code for deciding country of mixed football matches
    By aaaaa34 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 06-02-2019, 04:35 AM
  5. Replies: 7
    Last Post: 12-20-2012, 04:58 PM
  6. Betting list help needed
    By Banners80 in forum Excel General
    Replies: 0
    Last Post: 01-10-2012, 08:23 AM
  7. Eliminating football matches if they don't have certain markets
    By Interesting Ian in forum Excel General
    Replies: 18
    Last Post: 10-24-2009, 03:11 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1