+ Reply to Thread
Results 1 to 4 of 4

Please Explain this Column Combination Macro

  1. #1
    Registered User
    Join Date
    01-12-2011
    Location
    Michigan, USA
    MS-Off Ver
    2010
    Posts
    16

    Please Explain this Column Combination Macro

    TechRetard had a question about combining multiple columns based on ID in this thread: http://www.excelforum.com/excel-prog...sed-on-id.html

    mrice replied with a macro (that I tested, and it works on the sample data) that I would very much like to understand on a line-by-line basis, as it seems like I could learn some valuable tools from it.

    Please Login or Register  to view this content.
    This code seems genius to me, as it does a lot in a very little amount of space (though with variable declaration the size would be increased a bit). I would be very grateful for a line-by-line explanation of the above code (minus the first line, the last five lines, and the other "End If" line, but everything else is practically foreign to me).

  2. #2
    Registered User
    Join Date
    01-19-2012
    Location
    Hyderabad
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Please Explain this Column Combination Macro

    Hi Friend,
    I don't have any ID column. But i want to combine values as mentioned in the below (Sample)

    i want to create all possible combinations with the first column values..

    a1 d1 e1 f1 g1 a1d1e1f1g1
    a2 d2 e2 f2 g2 a1d2e1f1g1
    a3 d3 e3 g3 a1d3e1f1g1
    a4 d4 g4 a1d4e1f1g1
    a5 g5 a1d1e2f1g1
    g6 a1d2e2f1g1
    a1d3e2f1g1
    a1d4e2f1g1
    a1d1e3f1g1
    a1d2e3f1g1
    a1d3e3f1g1
    a1d4e3f1g1
    a1d1e1f2g1
    a1d2e1f2g1
    a1d1e1f1g2
    a1d2e1f1g2
    a1d3e1f1g2
    a1d4e1f1g2
    a1d1e2f1g2
    a1d2e2f1g2
    a1d3e2f1g2
    a1d4e2f1g2
    a1d1e3f1g2
    a1d2e3f1g2
    a1d3e3f1g2
    a1d4e3f1g2
    a1d1e1f2g2
    a1d2e1f2g2
    a1d1e1f1g3
    a1d2e1f1g3
    a1d3e1f1g3
    a1d4e1f1g3
    a1d1e2f1g3
    a1d2e2f1g3
    a1d3e2f1g3
    a1d4e2f1g3
    a1d1e3f1g3
    a1d2e3f1g3
    a1d3e3f1g3
    a1d4e3f1g3
    a1d1e1f2g3
    a1d2e1f2g3


    Please help me.

    Thanks.

  3. #3
    Registered User
    Join Date
    01-19-2012
    Location
    Hyderabad
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Please Explain this Column Combination Macro

    Hi,
    Please help me to get the possible combination of values as given in the attachment.
    Thanks.
    Attached Files Attached Files

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: Please Explain this Column Combination Macro

    @sudhalaksh.

    Welcome to the Forum, unfortunately:

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread. It makes sense to have a new thread for your question because a thread with numerous replies can be off putting & difficult to pick out relevant replies.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ 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