+ Reply to Thread
Results 1 to 4 of 4

How do I create a macro to return all possible combinations of letters?

  1. #1
    Registered User
    Join Date
    03-26-2010
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    2

    How do I create a macro to return all possible combinations of letters?

    Hi All,

    I am hoping you can help, I have two sets of 8 letters and I want to compute each possible combination by randomly selecting 4 letters from each set. The 1st set I have put in A1-A8 and the second set I have put in B1-B8 (though these could easily be moved if necessary). I want excel to return all possible combinations for the above, ideally with each resulting string of 8 letters returned to a single cell.

    I am totally new to the idea of macros / code within excel and have managed to follow a couple of online tutorials to create a simple macro, but I don't have the understanding to convert this into useful knowledge to solve the above!

    Any help much appreciated!

    Many Thanks,
    Kate

  2. #2
    Forum Contributor
    Join Date
    09-23-2008
    Location
    Mexico
    Posts
    200

    Re: How do I create a macro to return all possible combinations of letters?

    Check this out:
    http://www.telefonica.net/web2/kl2/V...na_Larson).xls

  3. #3
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: How do I create a macro to return all possible combinations of letters?

    As a matter of curiosity, why should such a problem arise?

    I am interested to hear where, in practice, such a problem needs solving.

    Is it just an academic foible?

  4. #4
    Registered User
    Join Date
    03-26-2010
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: How do I create a macro to return all possible combinations of letters?

    This was not quite what I wanted but good enough - many thanks!
    The reason for it was not academic at all, but I am in the process of "meshing" 2 names into one and wanted to see all the possible 8-letter anagrams made up of equal parts of the 2 existing 8-letter names, to see if any really stood out. the solution given by Armando was the best I have found, I just have to pick 8 letters to use rather than them being randomly selected!
    Last edited by k8b; 03-31-2010 at 10:41 AM.

+ 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