Results 1 to 22 of 22

Complex Combinatorial sort VBA/Macro

Threaded View

4petris Complex Combinatorial sort... 03-14-2018, 05:54 PM
karedog Re: Complex Combinatorial... 03-14-2018, 11:51 PM
4petris Re: Complex Combinatorial... 03-15-2018, 07:59 AM
shg Re: Complex Combinatorial... 03-15-2018, 11:23 AM
4petris Re: Complex Combinatorial... 03-15-2018, 11:41 AM
karedog Re: Complex Combinatorial... 03-15-2018, 12:26 PM
kvsrinivasamurthy Re: Complex Combinatorial... 03-15-2018, 12:47 PM
AliGW Re: Complex Combinatorial... 03-15-2018, 02:07 PM
4petris Re: Complex Combinatorial... 03-17-2018, 06:29 PM
4petris Re: Complex Combinatorial... 03-15-2018, 06:27 PM
4petris Re: Complex Combinatorial... 03-17-2018, 06:58 PM
karedog Re: Complex Combinatorial... 03-18-2018, 04:43 AM
4petris Re: Complex Combinatorial... 03-18-2018, 09:21 AM
karedog Re: Complex Combinatorial... 03-22-2018, 01:00 AM
4petris Re: Complex Combinatorial... 03-23-2018, 01:06 PM
karedog Re: Complex Combinatorial... 03-24-2018, 12:21 AM
4petris Re: Complex Combinatorial... 03-27-2018, 05:24 AM
karedog Re: Complex Combinatorial... 04-02-2018, 09:56 AM
4petris Hello, Thank you for... 04-02-2018, 10:04 AM
karedog Re: Complex Combinatorial... 04-02-2018, 10:36 AM
4petris Re: Complex Combinatorial... 04-04-2018, 05:56 AM
karedog Re: Complex Combinatorial... 04-04-2018, 07:27 AM
  1. #1
    Registered User
    Join Date
    09-04-2017
    Location
    Prague
    MS-Off Ver
    2016
    Posts
    47

    Complex Combinatorial sort VBA/Macro

    Hi everyone,

    I have a tricky task Let me clarify that step by step below.

    Input
    • table with 5 columns
    • columns are: combination, place1, place2, place3, income
    • column combination represents a number of each combination (combination of 3 places)
    • place1, 2, 3 are basically points where a car needs to go
    • income says how much we get paid to drive in a specific combination (way)

    e.g. we can say that combination #6 brings 13628.40 income and the car needs to go through places A, O & M.

    First of all, I need to find out the way how I specify: Let's say that formula will go from combination 1 to 197. We currently know that all combinations are sort from the biggest price to the lowest one.

    Secondly, I need to set up the rule saying, once you drove through a specific place, DO NOT drive through that point again.
    e.g. We take the combination #1 F, A, O and we know that cannot drive again to those points. So a formula looks for other combinations the next possible combination is #13 since M, K, N do not match with previous combination F, A, O. Now we have already 6 places where the car cannot drive anymore. F, A, O, M, K, N. Then the next available combination is E, I, J. And it goes like that until it does not have all possible combinations found.

    We can say that all found combinations are below:

    combination place1 place2 place3 income
    1 F A O 16566
    13 M K N 12126
    19 E I J 10610
    74 Q T R 5500
    93 G H C 4695


    TOTAL Income is 49549. This result is based on the fact, that formula goes from combination #1 to #197 where biggest incomes are first. What if the table is sort in a different way? How many combinations can be there? 197 factorial? How can find the best distribution in order to get the highest income value?
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Sort complex Excel Table with VBA
    By mthwi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-25-2017, 04:33 PM
  2. [SOLVED] help with a complex sort of adding function
    By disterbed in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-18-2014, 10:37 PM
  3. Excel to sort complex numbers in correct order
    By RichTea88 in forum Excel General
    Replies: 5
    Last Post: 12-04-2014, 08:18 AM
  4. Help with solver - reverse combinatorial problem / transportation optimization scenario
    By jon_nxt2000 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-30-2014, 07:25 PM
  5. Complex sort returning duplicates (no really)
    By gotheframe in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-02-2014, 11:41 AM
  6. Replies: 7
    Last Post: 06-15-2010, 08:17 PM
  7. Complex Sort Question
    By Chas in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-15-2006, 10:20 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