combinations

  • Hi everybody, I will try to be clear, I apologize ahead of time if error occur. I know that taken 6 numbers from 26 there are 230.230 combinations, I am trying to refine that list by placing certain conditions. Ideally I would like to INPUT a sum with designated value and the amount of evens and odds numbers I want.
    DIRECTION: (1) NO IQUAL DIFFERENTS, what really means is, no concecutive or multiples, like 15-16-17-18-19 etc. or 16-18-20-22-etc. or 1-8-15-22-etc all of them you can see have iqual differents.
    DIRECTION: (2) NO REPEATING NUMBERS, the output list example can show you exactly what non-repeating numbers means: 1-13-18-24-40-53 / 3-11-24-29-35-51 / 4-7-20-23-38-48 / 14-24-29-30-51-53 / 12-17-19-21-33-37 /. thanks.

  • Re: combinations


    This is something I wrote a little while ago when working with Binomial Coefficients and imposing various output conditions and I must admit I am still working on it however you are welcome to mod it to your hearts content. I have only posted the code that does the actual combinations - see the attachment for full code

    Files

    Regards
    [SIZE=3]Anthony
    [/SIZE]&WCF_AMPERSAND[SIZE=3]
    [/SIZE]&WCF_AMPERSAND&WCF_AMPERSAND&WCF_AMPERSAND[SIZE=2]You have your way. I have my way. As for the right way, the correct way, and the only way, it does not exist.[/SIZE]




  • Re: combinations


    What version of excel are you using?

    Regards
    [SIZE=3]Anthony
    [/SIZE]&WCF_AMPERSAND[SIZE=3]
    [/SIZE]&WCF_AMPERSAND&WCF_AMPERSAND&WCF_AMPERSAND[SIZE=2]You have your way. I have my way. As for the right way, the correct way, and the only way, it does not exist.[/SIZE]




  • Re: combinations


    2003, so I am typing now letter by letter and in the part 1Row = 1Row + 1 in the second row, said end of the statements error, so I am working, but still is hard.

  • Re: combinations


    Try this version - the numbers in column A must be in ascending order however the code should do that. It has been a while since I have worked with this however as I said you are welcome to mod it to your needs. I checked this version and it will work with 2003.

    Files

    Regards
    [SIZE=3]Anthony
    [/SIZE]&WCF_AMPERSAND[SIZE=3]
    [/SIZE]&WCF_AMPERSAND&WCF_AMPERSAND&WCF_AMPERSAND[SIZE=2]You have your way. I have my way. As for the right way, the correct way, and the only way, it does not exist.[/SIZE]




  • Re: combinations


    Quote from smuzoen;587625

    Try this version - the numbers in column A must be in ascending order however the code should do that. It has been a while since I have worked with this however as I said you are welcome to mod it to your needs. I checked this version and it will work with 2003.

    .
    Hey!. I am working in something similar like the other person, and I tried your code, really good, except I don't really need all possible combinations I just need the ones with the criteria. anything you can do thankssss. newjersey.

  • Re: combinations



    Tnks, smuzoen, I gonna say again, I tried your code (83.kb) because the other one did not work. (I know, my version is 003), I also saw somebody is working on something similar, but not the same. I don't really need all the combinations, definately NOT. First I already have a big array of combinations to omit and in the same manner avoiding the corresponding different. Your sum range works for me, your evens and odds the same, but you don't have the gaps. if you decide to cooperate in my project let me know, at the university here nobody gets my idea.

  • Re: combinations


    smuzoen your code is great, just son adjustment would be perfect. like I don't need all possible combination just the combination that fit the input.

  • Re: combinations


    smuzoen. I tried your code, do you think is possible to add one more definition?. you write a sum range what about if you putting as input VALUES OFF. mean among the sum range there are some sum values that are not need it, at least to be able to turn off 18 sum values. example, minimum value 125 maximum value 155
    but turn off the values 137 139 142 etc. and 14 more values. can you please. I am using the excel 2003

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!