+ Reply to Thread
Results 1 to 15 of 15

generate formations of 15 random numbers, but must not have 14.15 points

  1. #1
    Forum Contributor
    Join Date
    11-29-2014
    Location
    brasil
    MS-Off Ver
    excel 2016
    Posts
    2,177

    generate formations of 15 random numbers, but must not have 14.15 points

    generate formations of 15 random numbers, but must not have 14.15 points from the past draw list
    so the macro cannot generate information that has 14 or 15 of any draws passed each week I will place new draws, and the macro has to filter
    https://www.excelforum.com/attachmen...1&d=1580149409
    Attached Files Attached Files

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: generate formations of 15 random numbers, but must not have 14.15 points

    Sorry, but I just don;t understand your terminology or requirement

    Pleas euplaod an example of what wouldn't be a valid series of numbers and explain why.

    WHat do you mean by past draws. Do you mean all 1891?
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Contributor
    Join Date
    11-29-2014
    Location
    brasil
    MS-Off Ver
    excel 2016
    Posts
    2,177

    Re: generate formations of 15 random numbers, but must not have 14.15 points

    ok richard, thanks for viewing the post, well, could do like this is generated a
    * numbers of random 15-number formations
    * then it would be filtered by the previous draws of noa 14 to 15 would be excluded, but I think the macro can also generate filtering in the list of draws
    * example = 01 02 03 05 08 09 10 11 15 16 17 19 20 21 22, this formation has 14 repetitions of a draw, so it is excluded, it cannot have 14 or 15
    * any previous draw or example
    01 02 04 05 08 09 10 11 15 16 17 19 20 21 25,
    * this form has 15 repetitions from one of the draws
    * previous, then it is excluded, it cannot have 14 to 15 repetitions of the past drawings,
    13 repetitions can

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: generate formations of 15 random numbers, but must not have 14.15 points

    What counts as a repetition?

    You say the series
    01 02 03 05 08 09 10 11 15 16 17 19 20 21 22

    has 14 repetitions. I can find no repetitions when I filter the first column for 01, then the next for 02 then the 3rd 03.... etc

  5. #5
    Forum Contributor
    Join Date
    11-29-2014
    Location
    brasil
    MS-Off Ver
    excel 2016
    Posts
    2,177

    Re: generate formations of 15 random numbers, but must not have 14.15 points

    the macro has to compare with the list of draws, it is easy, as until now it has not repeated a draw with 15 points and with 14 very few, so any formation of 15 cannot be the same as the list of draws of 14

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: generate formations of 15 random numbers, but must not have 14.15 points

    I'm trying to understand the example you showed where you said there were 14 duplicates for the 15 number series you listed.

    Filtering the data fir each of those column positions for the number you mentioned shows there is only one row with those numbers. How do you get 14 row all exactly the same?

  7. #7
    Forum Contributor
    Join Date
    11-29-2014
    Location
    brasil
    MS-Off Ver
    excel 2016
    Posts
    2,177

    Re: generate formations of 15 random numbers, but must not have 14.15 points

    hello richard, the probability of repeating 14.15 points from the draw list is very remote, this is what i talk about
    * the randomly generated formation cannot equal 14, and 15 of the draws

  8. #8
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: generate formations of 15 random numbers, but must not have 14.15 points

    Are you now saying that what you said in #3 is not correct and there aren't 14 repetitions at all?

  9. #9
    Forum Contributor
    Join Date
    11-29-2014
    Location
    brasil
    MS-Off Ver
    excel 2016
    Posts
    2,177

    Re: generate formations of 15 random numbers, but must not have 14.15 points

    an example you generate 20 formations from 15 from 01 to 25 if one of them has 14 or 15 of the previous draws or is equal will be excluded

  10. #10
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: generate formations of 15 random numbers, but must not have 14.15 points

    Sorry but we're just misunderstanding each other.

    You say there are 14 repetitions in the data you show. i.e. the 15 numbers in the same column positions, I don't see that.

    Or are you saying that you start with no data at all and you want tp produce that list of 1891 rows. I had assumed you were continually adding a new row to the table and wanted to ensure that there were less than 14 repetitions.

  11. #11
    Forum Contributor
    Join Date
    11-29-2014
    Location
    brasil
    MS-Off Ver
    excel 2016
    Posts
    2,177

    Re: generate formations of 15 random numbers, but must not have 14.15 points

    you do not have to look at the positions, but the total of 14 or 15 cannot be equal to draws that have already occurred

  12. #12
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: generate formations of 15 random numbers, but must not have 14.15 points

    Would you comment on my last point. It's not clear whether the large data set you show is already in place and you want to check a new series yuo generate, or whether you start with a blank sheet and want to generate x number of rows.

  13. #13
    Forum Contributor
    Join Date
    11-29-2014
    Location
    brasil
    MS-Off Ver
    excel 2016
    Posts
    2,177

    Re: generate formations of 15 random numbers, but must not have 14.15 points

    ok Richard, thanks for viewing the post the list is from lotofacil lottery (brazil)
    where we have 01 to 25, 15 are drawn, there are prizes for 15,14,13, what I want to avoid is playing games of 15 where I already have 14,15 of the draw lottery

  14. #14
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,632

    Re: generate formations of 15 random numbers, but must not have 14.15 points

    This is the old thread, but as I noticed it answering on a new topic (at the bottom of the webpage there is "Similar Threads" section) and the code for random generation of 15 out of 25 grawning can be recycled also here, so I did it.
    The new thread is: https://www.excelforum.com/excel-pro...ml#post5747709
    And the code is (the recycled part is used as a private sub):

    Please Login or Register  to view this content.

    Note that I added one column to your original file - the date of past lottery drawings. (filled this with any dates, you probably have real dates available). This allows to show not only that given generated combination was already (as a whole 15 or 14 numbers out of it) drawn but also show when and if it was dwand more than once list all dates - see row 17 in attached file
    Attached Files Attached Files
    Last edited by Kaper; 10-30-2022 at 05:58 AM.
    Best Regards,

    Kaper

  15. #15
    Forum Contributor
    Join Date
    11-29-2014
    Location
    brasil
    MS-Off Ver
    excel 2016
    Posts
    2,177

    Re: generate formations of 15 random numbers, but must not have 14.15 points

    ok KAPER, CORRECT, thank you!

+ 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. [SOLVED] generate random numbers in random range vba
    By hsnfifo in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-20-2020, 12:59 PM
  2. Replies: 6
    Last Post: 04-29-2019, 08:32 AM
  3. generate random formations, but in the following factions .
    By jorel in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-14-2018, 07:27 AM
  4. hello please generate formations of 5 numbers in the criteria *.
    By jorel in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-15-2018, 11:15 AM
  5. [SOLVED] Generate random formations, but without repeating the letters in the columns and in the ro
    By jorel in forum Excel Programming / VBA / Macros
    Replies: 22
    Last Post: 04-13-2017, 01:15 PM
  6. Generate Random Numbers Between 0-9
    By dreicer_Jarr in forum Excel General
    Replies: 11
    Last Post: 01-17-2014, 01:00 AM
  7. generate random numbers
    By fo05kka in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-08-2009, 09:55 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