+ Reply to Thread
Results 1 to 4 of 4

How to Generate all possible combinations?

  1. #1
    Registered User
    Join Date
    09-15-2017
    Location
    United States
    MS-Off Ver
    2016
    Posts
    6

    How to Generate all possible combinations?

    Hello!

    I am trying to determine the shortest flow path for a list of routings, the flow has to go through all six each time. I am trying to determine a way to calculate/display all 6! (720 combinations) of the route. The different stages are 1-2-3-4-5-6.

    I need a way for excel to display all possible combinations (134562,154362,etc)

    Is there a way to do this?

  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,146

    Re: How to Generate all possible combinations?

    See attached.

    Contains a VBA routine for calculating permutations/combinations.
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    07-16-2015
    Location
    Aberdeen, Scotland
    MS-Off Ver
    Excel 2010
    Posts
    121

    Re: How to Generate all possible combinations?

    MM

    Its not combination your looking for its permutation.

    Ill be interested to see if one of the gurus can resolve this, best of luck

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,810

    Re: How to Generate all possible combinations?

    Beyond simply generating combinations/permutations, it sounds more like the well known "shortest path" problem (Curiously, someone else just asked a different shortest path problem). I put "excel shortest path problem" into my favorite internet search engine and found many tutorials and discussions about this common problem. This was just the first on the list: http://www.excel-easy.com/examples/s...h-problem.html
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

+ 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 Combinations Using VBA
    By NeedForExcel in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 06-06-2021, 01:10 AM
  2. Generate Combinations
    By subrato312 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-04-2017, 12:53 PM
  3. [SOLVED] generate combinations
    By H.Merlow in forum Excel General
    Replies: 3
    Last Post: 08-04-2016, 05:14 PM
  4. generate combinations
    By aprildu in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-05-2016, 05:31 AM
  5. Generate all possible combinations
    By muttleychess in forum Excel General
    Replies: 7
    Last Post: 09-22-2014, 02:39 PM
  6. Generate combinations
    By cjt_choccy in forum Excel General
    Replies: 6
    Last Post: 11-20-2011, 02:51 PM
  7. How generate different number combinations
    By raigo in forum Excel General
    Replies: 2
    Last Post: 04-13-2010, 04:52 PM

Tags for this Thread

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