+ Reply to Thread
Results 1 to 9 of 9

Commbinations with VBA

  1. #1
    Registered User
    Join Date
    02-25-2008
    Posts
    29

    Commbinations with VBA

    Hello Forum

    I have this values that i want to make all combination possibles

    I have columns from A to R, so a lot of columns. I want to combine the values from the columns.

    I have this code that i modified, not an expert, but is not working. Need some help


    Please Login or Register  to view this content.

  2. #2
    Forum Expert OllieB's Avatar
    Join Date
    12-20-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2007 (home) & 2010 (office)
    Posts
    1,542

    Re: Commbinations with VBA

    No really sure what you are trying to achieve here, but the below code would provide the same output

    Please Login or Register  to view this content.
    If you like my contribution click the star icon!

  3. #3
    Registered User
    Join Date
    02-25-2008
    Posts
    29

    Re: Commbinations with VBA

    Hello There

    Here are my columns .

    7691058AD6AA0.jpg

    I need all possible permutation with the values for the given columns.

  4. #4
    Forum Expert OllieB's Avatar
    Join Date
    12-20-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2007 (home) & 2010 (office)
    Posts
    1,542

    Re: Commbinations with VBA

    I am sorry but I do not understand what you are asking for.

  5. #5
    Registered User
    Join Date
    02-25-2008
    Posts
    29

    Re: Commbinations with VBA

    Hello There

    Here are my columns .

    Attachment 270448

    I need all possible permutation with the values for the given columns. Alo the macros should take only values, and ignore the balnks

  6. #6
    Registered User
    Join Date
    02-25-2008
    Posts
    29

    Re: Commbinations with VBA

    I want to combine all values and make a list of all possible permutations.

  7. #7
    Registered User
    Join Date
    02-25-2008
    Posts
    29

    Re: Commbinations with VBA

    Here an example af permutation with values from 4 columns
    0-3 t <K$100 B YES -dep YES -dep
    0-3 t <K$100 B YES -dep NO - dep
    0-3 t <K$100 B NO -dep YES -dep
    0-3 t <K$100 B NO -dep NO - dep
    0-3 t K$100-K$500 B YES -dep YES -dep
    0-3 t K$100-K$500 B YES -dep NO - dep
    0-3 t K$100-K$500 B NO -dep YES -dep
    0-3 t K$100-K$500 B NO -dep NO - dep
    0-3 t K$500-K$1000 B YES -dep YES -dep
    0-3 t K$500-K$1000 B YES -dep NO - dep
    0-3 t K$500-K$1000 B NO -dep YES -dep
    0-3 t K$500-K$1000 B NO -dep NO - dep
    0-3 t >K$1000 B YES -dep YES -dep
    0-3 t >K$1000 B YES -dep NO - dep
    0-3 t >K$1000 B NO -dep YES -dep
    0-3 t >K$1000 B NO -dep NO - dep
    0-6 t <K$100 B YES -dep YES -dep
    0-6 t <K$100 B YES -dep NO - dep
    0-6 t <K$100 B NO -dep YES -dep
    0-6 t <K$100 B NO -dep NO - dep
    0-6 t K$100-K$500 B YES -dep YES -dep
    0-6 t K$100-K$500 B YES -dep NO - dep
    0-6 t K$100-K$500 B NO -dep YES -dep
    0-6 t K$100-K$500 B NO -dep NO - dep
    0-6 t K$500-K$1000 B YES -dep YES -dep
    0-6 t K$500-K$1000 B YES -dep NO - dep
    0-6 t K$500-K$1000 B NO -dep YES -dep
    0-6 t K$500-K$1000 B NO -dep NO - dep
    0-6 t >K$1000 B YES -dep YES -dep
    0-6 t >K$1000 B YES -dep NO - dep
    0-6 t >K$1000 B NO -dep YES -dep
    0-6 t >K$1000 B NO -dep NO - dep
    1 t <K$100 B YES -dep YES -dep
    1 t <K$100 B YES -dep NO - dep
    1 t <K$100 B NO -dep YES -dep
    1 t <K$100 B NO -dep NO - dep
    1 t K$100-K$500 B YES -dep YES -dep
    1 t K$100-K$500 B YES -dep NO - dep
    1 t K$100-K$500 B NO -dep YES -dep
    1 t K$100-K$500 B NO -dep NO - dep
    1 t K$500-K$1000 B YES -dep YES -dep
    1 t K$500-K$1000 B YES -dep NO - dep
    1 t K$500-K$1000 B NO -dep YES -dep
    1 t K$500-K$1000 B NO -dep NO - dep
    1 t >K$1000 B YES -dep YES -dep
    1 t >K$1000 B YES -dep NO - dep
    1 t >K$1000 B NO -dep YES -dep
    1 t >K$1000 B NO -dep NO - dep
    >1 t <K$100 B YES -dep YES -dep
    >1 t <K$100 B YES -dep NO - dep
    >1 t <K$100 B NO -dep YES -dep
    >1 t <K$100 B NO -dep NO - dep
    >1 t K$100-K$500 B YES -dep YES -dep
    >1 t K$100-K$500 B YES -dep NO - dep
    >1 t K$100-K$500 B NO -dep YES -dep
    >1 t K$100-K$500 B NO -dep NO - dep
    >1 t K$500-K$1000 B YES -dep YES -dep
    >1 t K$500-K$1000 B YES -dep NO - dep
    >1 t K$500-K$1000 B NO -dep YES -dep
    >1 t K$500-K$1000 B NO -dep NO - dep
    >1 t >K$1000 B YES -dep YES -dep
    >1 t >K$1000 B YES -dep NO - dep
    >1 t >K$1000 B NO -dep YES -dep
    >1 t >K$1000 B NO -dep NO - dep

  8. #8
    Forum Expert OllieB's Avatar
    Join Date
    12-20-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2007 (home) & 2010 (office)
    Posts
    1,542

    Re: Commbinations with VBA

    I understand what you need by I do not have the time at present to write a solution. Perhaps someone else can help

  9. #9
    Registered User
    Join Date
    02-25-2008
    Posts
    29

    Re: Commbinations with VBA

    This code seems to work for a reduced number of columns, but it takes also the blank space in consideration, how can ask the macro to ignore the blanks
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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