Results 1 to 3 of 3

Thread: Random combination from 2 columns

  1. #1

    Random combination from 2 columns



    Register for a FREE account, and/
    or Log in to avoid these ads!

    Hi, is there any possible way (preferably with macros) that I could generate a combination between 2 columns of values?
    E.g.

    Column A: Apple, Orange, Pear, Jackfruit
    Column B: Monkey, Tiger, Lion, Leopard, Chimpanzee, Gorilla

    Generated column: Apple-Tiger, Orange-Lion, Pear-Monkey, Jackfruit-Gorilla, Orange-Leopard, Pear-Chimpanzee
    *Requirements:
    1. The number of combinations generated should be the same as the number of rows in the column (A or B - whichever has more) that has values. i.e. Column B has 6, Column A has 4: Combinations generated 6
    2. Each value in A or B should appear at least once.

    Appreciate any help. Thanks!

  2. #2
    Can you clarify what you actually want. Using your example, if Column A contains 4 elements (Apple, Orange,Pear, Jackfruit) and Column B six (6) elements, the number of (exhaustive) combinations will be 4 x 6 = 24 and NOT 6 as per you definition.

  3. #3
    Super Moderator p45cal's Avatar
    Join Date
    Dec 2012
    Posts
    1,709
    Articles
    0
    Excel Version
    365
    cross posted without links:
    http://www.excelforum.com/excel-prog...-2-colums.html
    yawwwn, for your information, you should always provide links to your cross posts.
    If you have cross posted at other places, please add links to them too.
    Why? Have a read of http://www.excelguru.ca/content.php?184

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •