+ Reply to Thread
Results 1 to 7 of 7

getting all possible set combinations of a set of numbers

  1. #1
    Registered User
    Join Date
    04-21-2015
    Location
    Brazil
    MS-Off Ver
    2003
    Posts
    5

    getting all possible set combinations of a set of numbers

    Hi everyone!

    I'd like to get all possible combinations of a number set using excel functions. I'm not OK with VBA.
    I mean, for example, we have a set of 4 numbers (1,2,3,4) and we need as result all combinations, without repetitions, using two of the original set.

    Thanks in advance.
    Juares Castro.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,228

    Re: getting all possible set combinations of a set of numbers

    See attached (contains macro). Calculates any Permutation/Combination
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    04-21-2015
    Location
    Brazil
    MS-Off Ver
    2003
    Posts
    5

    Re: getting all possible set combinations of a set of numbers

    Thanks John for your response.
    Your macro works good.
    Actually I'd like to learn how to do this only with excel functions.
    Anyway... thanks again.
    Juares Castro.

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,228

    Re: getting all possible set combinations of a set of numbers

    This a solution supplied by Ron Coderre on this forum in 2012. In my ignorance I don't how to refer you back to the original post so I simply copied Ron's solution. The attached has a sample implementation in Sheet2

    Set A1:D1 to 0
    Then

    A2: =IF(SUM(B1:D1)=6,MOD(A1+1,3),A1)
    B2: =IF(SUM(C1:D1)=4,MOD(B1+1,3),B1)
    C2: =IF(D1=2,MOD(C1+1,3),C1)
    D2: =MOD(D1+1,3)


    copy those formulas down through Row_81

    Next:

    F1: =LOOKUP(A1,{0,1,2},{"a","b","c"})


    Copy that formula across and down through I81
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: getting all possible set combinations of a set of numbers

    @John Toply,

    copy the internetadres from the box and paste it in your topic.

    Below the hyperlink to this topic.


    http://www.excelforum.com/excel-form...f-numbers.html
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  6. #6
    Registered User
    Join Date
    04-21-2015
    Location
    Brazil
    MS-Off Ver
    2003
    Posts
    5

    Re: getting all possible set combinations of a set of numbers

    Thanks John!

  7. #7
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,228

    Re: getting all possible set combinations of a set of numbers

    FYI: I find "Googling" queries often throws up answers (which is how I discovered this one): by chance it pointed to this forum.

+ 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. please help!!ALL COMBINATIONS REQUIRED FOR 5-DIGIT NUMBERs using numbers 0-9
    By natasha mirembe in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-08-2014, 01:43 PM
  2. [SOLVED] Different Combinations of 24 Numbers
    By danedw in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-20-2013, 07:03 AM
  3. Replies: 1
    Last Post: 04-15-2012, 09:23 AM
  4. Possible Combinations Of A Given Set Of Numbers??
    By Jennylyn1 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-01-2007, 06:24 PM
  5. solving for all possible combinations of a set of numbers
    By Tom Ogilvy in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-06-2005, 12:05 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