+ Reply to Thread
Results 1 to 39 of 39

generate 12 numbers in each quadrant * without repeating the letter positions.

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

    generate 12 numbers in each quadrant * without repeating the letter positions.

    generate 12 numbers in each quadrant
    * without repeating the letter positions
    so I type in twelve numbers, any, within one of the quadrants, (will be generated 48 numbers in total), we have 4 quadrants in 4 colors,
    I will choose, 12 numbers they become base not to repeat the other letters in the 3 quadrants,
    * if I choose number 02 I can't play 07 52 57
    * because it is the same letter or in the same position, as with the other 11 numbers
    * objective = generate 12 random numbers in each quadrant, but cannot repeat from the same position
    * reference or base quadrant
    https://www.excelforum.com/attachmen...1&d=1565208698
    Attached Files Attached Files

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

    Re: generate 12 numbers in each quadrant * without repeating the letter positions.

    will need a field where I type the 12 numbers of each quadrant, these numbers I will choose within each quadrant will become base, not to be the same letter

  3. #3
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,534

    Re: generate 12 numbers in each quadrant * without repeating the letter positions.

    I don't believe that this will work.
    If 12 numbers are chosen from each quadrant that is 48 numbers.
    There are only 25 letters, so that it will not be possible to choose 48 numbers without repeating most of the letters.
    I have attempted to illustrate the point in X1:AV5.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

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

    Re: generate 12 numbers in each quadrant * without repeating the letter positions.

    hello ok, I didn't realize this,
    * my lottery has 100 numbers
    * is drawn 20, 100/20 (lotomania)
    ok can you do to respect as little as possible? you can see that in other lotteries
    * where are drawn 6 numbers there works
    so do to repeat few letters please

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

    Re: generate 12 numbers in each quadrant * without repeating the letter positions.

    hello JeteMc =Phase A - base numbers

    1. Choose 4 random letters of 25, assign them to 4 numbers from quadrant 1

    2. Choose 4 random letters of remaining 21, assign them to 4 numbers from quadrant 2

    3. Choose 4 random letters of remaining 17, assign them to 4 numbers from quadrant 3

    4. Choose 4 random letters of remaining 13, assign them to 4 numbers from quadrant 4



    Phase B - completing the game

    1. Take the remaining 9 letters and assign them to corresponding numbers in each quadrant - you get 36 numbers

    2. Choose 2 random numbers of these 36 to eliminate, you are left with 34 numbers

    3. Combine these 34 numbers and the 16 base numbers to get a game of 50 numbers

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,534

    Re: generate 12 numbers in each quadrant * without repeating the letter positions.

    If you could upload a sample file where the phases (A&B) are manually illustrated it may make it easier for someone to automate the process.
    Let us know if you have any questions.

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

    Re: generate 12 numbers in each quadrant * without repeating the letter positions.

    ok, JETEMC but you need to create an algorithm for that, and I don't know how, but the goal is to avoid repeating the base number, I know you can repeat some, ko can do with repetitions ok

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

    Re: generate 12 numbers in each quadrant * without repeating the letter positions.

    hello jete
    1. Choose a random combination of 6 numbers from 25. (eg, 3,7,12,17,20,23) If you want 25 numbers, then you simply take all the 1 .. 25.

    2. For each number, if the last digit is greater than 5 or equal to 0, you add 25. (7 -> 32,17 -> 42, so that the above example becomes 3,12,20,23,32,42) This way you obtain a random combination of 6 numbers in the first quadrant.

    So, to answer your question, the numbers 3,12,20,23,32 and 42 are used as an example of a random combination in the first quadrant. They come from Step 2, quoted above. I've started with a random combination from 1..25 (Step 1), then added 25 where necessary to fit into the first quadrant. (Step 2, where 7 became 32 and 17 became 42, so that (3,7,12,17,20,23) becomes (3,32,12,42,20,23). Then I wrote it in an ascending order, perhaps you missed it because of that.

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

    Question

    Quote Originally Posted by jorel View Post
    Then I wrote it in an ascending order, perhaps you missed it
    Should we guess without seeing as always any work ? Where is 'your' code ? Not here as it must be ! …

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

    Re: generate 12 numbers in each quadrant * without repeating the letter positions.

    but the coordinates are there,
    is not to repeat the letters !!!

  11. #11
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: generate 12 numbers in each quadrant * without repeating the letter positions.

    Try this macro:

    Please Login or Register  to view this content.
    WBD
    Office 365 on Windows 11, looking for rep!

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

    Re: generate 12 numbers in each quadrant * without repeating the letter positions.

    hello wideboy, good job, you're correct, wide if i put more than one of 12 numbers
    * example
    I put 5 lines amcro do automatic?
    ex =
    02 05 06 ...... 12
    45 89 23 ...... 12
    75 20 12 ....... 12

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

    Re: generate 12 numbers in each quadrant * without repeating the letter positions.

    hello,WIDE magnificent, work, now step 2, is to generate random, but never the couple polindromo together
    * example 32 23 or 23 or 32 number both together in the same row
    * there are in 00 to 99 45 pairs polindromes or inverted couple 01 10 12 21 25 52 98 89 .... 45 pairs
    a couple of these can't show up together,
    * another 89 98 or 89 or 98 number both together
    * objective filter in random generation a couple number

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

    Re: generate 12 numbers in each quadrant * without repeating the letter positions.

    hello i need to generate 120 lines
    covering all numbers from 00 to 99
    * with filter do not generate polindrome pair

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

    Arrow


    Any clear sample ? As from the beginning the need always changes …

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

    Re: generate 12 numbers in each quadrant * without repeating the letter positions.

    hello was given an example of a line and it worked, now i need 120 lines, can generate by filtering the polindrome pair, ex 29, 92
    * within the lines of the 4 segments can not have the pair or 92 or 29 number together and so with the other pairs

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

    Question


    An example : where ?!

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

    Re: generate 12 numbers in each quadrant * without repeating the letter positions.

    ok, let's make it easier to generate random lines with 50 numbers, but you can't have one of the 45 possible
    * from 00 to 99
    so = 01 05 15 26 35 42 48 62 = oops can't have 62 because it's polindromo, capicuas or inverted couple, only one of them

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

    Re: generate 12 numbers in each quadrant * without repeating the letter positions.

    45 =
    01 10
    02 20
    03 30
    04 40
    05 50
    06 60
    07 70
    08 80
    09 90
    12 21
    13 31
    14 41
    23 32
    15 51
    24 42
    25 52
    34 43
    16 61
    17 71
    26 62
    35 53
    37 73
    28 82
    19 91
    38 83
    56 65
    39 93
    49 94
    58 85
    67 76
    59 95
    68 86
    69 96
    79 97
    89 98
    18 81
    27 72
    36 63
    45 54
    47 74
    46 64
    29 92
    38 83
    78 87
    68 86
    49 94
    57 75
    48 84

    11 22

    33 44

    55 66

    77 88

    99 00

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

    Re: generate 12 numbers in each quadrant * without repeating the letter positions.

    above we have the list of 45 capicua or inverted pairs and the 10 pairs
    * twins = 00 11 .... 99
    * so how to generate lines of 50 numbers
    * can't have 01 10 together or 78 89 just one of them

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

    Re: generate 12 numbers in each quadrant * without repeating the letter positions.

    Whow ! Your list from "01 10" to "48 84" = 48 pairs not 45 ! Whatever …

    But explain the second part from "11 22" to "99 00", what do you do with it ?

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

    Re: generate 12 numbers in each quadrant * without repeating the letter positions.

    hello, ranging from 00 to 99 we have 45 polindrome pairs, and 10 twins
    let's change!!! you will generate many random lines of 40 numbers (you can bet up to 50 numbers) lotomania (brazil), but these 40 numbers can't have a present pair of 45, only one number of it, ex or 23, or 32 numca together and so asos 45 then and I will fix the 10 twins =

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

    Arrow

    Yes your post #19 list is wrong with 48 pairs !

    Crystal clear explain the twins rules at least …

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

    Re: generate 12 numbers in each quadrant * without repeating the letter positions.

    yes sorry for the list but it's 45 pairs
    * 45 for 2 = 90 numbers plus 10 twins = togal 100 doubles from 00 to 99
    don't worry about the twins will be fixed
    * you have to scream 40 number lines without the pair capicuas

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

    Arrow

    No as I have already solutions I won't code anything more, I just want all the rules and fixed, not to be changed,
    in order to select the more appropriate …

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

    Re: generate 12 numbers in each quadrant * without repeating the letter positions.

    ok you're correct so generate 40 number lines without the polindromo couple
    * only one number of each couple numca the couple together
    *

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

    Arrow

    As I expect your complete explanation (so with twins as requested !) to generate the 50 numbers
    as it's already done since previous century !

    Generating numbers is at child level but the difficulty here is your attachment & 'explanation', as often …

    As it seems you are not able to think & explain an easy algorithm to generate this pairs list
    - nothing about coding but just about logic -
    so starting from a worksheet with a two columns pairs list without any duplicate
    needs no more than 10 codelines to generate 50 numbers …

    As I have several ways to present the result, explain also the result expected layout
    or attach a worbook with some results without forgetting a correct & complete pairs list
    as I think you may have difficulties to amend any shared code
    'cause since more than a year you always create threads for generating numbers
    even if you already have all the necessary in your previous threads …
    Last edited by Marc L; 08-17-2019 at 10:41 AM. Reason: typo …

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

    Arrow

    As I have to go to the swimming pool, you have an hour to well answer …

    After a short explanation a little 10 years old boy - the son of a friend needing a mod in his laptop - found the errors in your list
    then he explained the logic in order to generate the numbers in a row : I converted it with success to a 5 VBA codelines only.

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

    Re: generate 12 numbers in each quadrant * without repeating the letter positions.

    ok you are correct, can you make the 5 line code? thank you

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

    Arrow

    These five codelines just generate an unique 50 numbers row, is that all you need ?
    I could share this child code as it is (later 'cause it's on another computer) but
    are you able to amend it to fit your need as since more than a year you asked to generate numbers
    so you already have all the necessary in your past threads, there is nothing new with these five codelines …

    If you need a more targeted code, again it depends also on your complete explanation of rules (fixed)
    (in particular for twins) or / and on an attachment with some results layout as I requested several times !

    As I yet wrote : I already have several ways so I need answers in order to choose the appropriate way,
    well read post #25 & 27 (like FDibbins as well, how can the truth be agressive ?!) …

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

    Re: generate 12 numbers in each quadrant * without repeating the letter positions.

    hello, forget about the 10 twins, just focus on 45 pairs polindromos
    * generate many numca formations with a pair along lines of 40 numbers
    and other game, generate with pairs only
    ex = 01 10 21 12 23 32
    so we have two conditions generate lines with numbers forget twins
    and generate only with pairs please

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

    Arrow

    Again :

    I'm still waiting for your attachment with the source pairs list and
    at least a sample result for the layout desired about this new need …

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

    Re: generate 12 numbers in each quadrant * without repeating the letter positions.


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

    Cool

    According to your attachment as a beginner starter :

    PHP Code: 
    Sub Demo40on45()
        
    Dim VL%, WC%, R%, N%(11939)
            
    = [I1:BA2].Value2
            Randomize
        
    For 0 To 119
                W 
    = [COLUMN(A:AS)]
            For 
    0 To 39
                R 
    Fix((45 C) * Rnd) + 1
                N
    (LC) = V(Fix(Rnd 2) + 1W(R))
                
    W(R) = W(45 C)
            
    Next
        Next
            
    [A5:AN124].Value2 N
    End Sub 
    Do you like it ? So thanks to click on bottom left star icon « Add Reputation » !

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

    Re: generate 12 numbers in each quadrant * without repeating the letter positions.

    hello, marc, uuhhh! perfect great job, congratulations, now can you create to generate only with peers? so we have 20 pairs on each line = ex = 02 20 23 32 ....... 40 numbers

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

    Arrow


    As you do not like it just amend the C loop to 19 and with the R random index fill the array N with both value from the array V …

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

    Re: generate 12 numbers in each quadrant * without repeating the letter positions.

    ok, Marc L, perfect, so I have both roles, great job, thanks MARC

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

    Arrow

    Thanks for the rep' !

    PHP Code: 
    Sub Demo20pairs()
        
    Dim VL%, WC%, R%, N%(11939)
            
    = [I1:BA2].Value2
            Randomize
        
    For 0 To 119
                W 
    = [COLUMN(A:AS)]
            For 
    0 To 19
                R 
    Fix((45 C) * Rnd) + 1
                N
    (L2) = V(1W(R)):  N(L2) = V(2W(R))
                
    W(R) = W(45 C)
            
    Next
        Next
            
    [A5:AN124].Value2 N
    End Sub 
    ► Do you like it ? ► ► So thanks to click on bottom left star icon « Add Reputation » !

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

    Re: generate 12 numbers in each quadrant * without repeating the letter positions.

    ok correct, thank MARC L

+ 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: 3
    Last Post: 11-26-2017, 08:58 AM
  2. Replies: 8
    Last Post: 01-19-2017, 01:38 PM
  3. Replies: 28
    Last Post: 12-08-2016, 04:39 AM
  4. [SOLVED] How to generate non-repeating random numbers in a column wihtout VB
    By luv2glyd in forum Excel General
    Replies: 4
    Last Post: 02-16-2015, 12:43 AM
  5. How to generate non-repeating random numbers
    By luv2glyd in forum Excel General
    Replies: 2
    Last Post: 09-24-2010, 12:16 PM
  6. using excel generate random numbers 1 to 52 without repeating
    By Norman in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-24-2006, 02:25 AM
  7. [SOLVED] How do I generate random, non-repeating numbers that don't change?
    By bsquared0 in forum Excel General
    Replies: 1
    Last Post: 07-30-2005, 12:05 AM

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