+ Reply to Thread
Results 1 to 4 of 4

Generate combinations for a variable number of columns in order

  1. #1
    Registered User
    Join Date
    07-30-2011
    Location
    Montreal, Qc
    MS-Off Ver
    Excel 2010
    Posts
    2

    Question Generate combinations for a variable number of columns in order

    Hi everyone,

    I was hoping someone would be able to guide me in the right direction... I'm going slightly batty here, and I'm pretty sure that without help, I'll wind up with a mess of While loops, while an alternative may be a much better idea.

    I have a workbook that has one sheet, with several columns containing data, typically numbers and letters. The columns do not have to have the same amount of data as the others. I have another workbook that has a column that's meant to have the combinations of these.

    However, the purpose of this file is to organize standards, and I'm hoping to be able to generate the proper combos. Here's an example of the columns (the number of columns can be variable...)

    5 C 2
    10 E 3
    15 4


    The combinations have to be in the same order as the columns... so the results would have to be like 5C3, 5E3, 10E4, etc. I've been searching for hours and have found nothing where the columns have to be the same order (with more than two columns).

    Any guidance will be greatly appreciated! Thanks!
    Last edited by q83; 07-30-2011 at 01:48 PM.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,602

    Re: Generate combinations for a variable number of columns in order

    Lookup "CONCATENATION" and the "&" operator in Help.
    Ben Van Johnson

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Generate combinations for a variable number of columns in order

    There's a workbook that will generate these combinations using formulas at http://www.box.net/shared/ubd28tissi
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Registered User
    Join Date
    07-30-2011
    Location
    Montreal, Qc
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Generate combinations for a variable number of columns in order

    Quote Originally Posted by shg View Post
    There's a workbook that will generate these combinations using formulas at http://www.box.net/shared/ubd28tissi
    Thanks. I ended up just using a ton of nestled loops... ugly, but it works.

+ 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