+ Reply to Thread
Results 1 to 4 of 4

Defined numbers - generator.

  1. #1
    Registered User
    Join Date
    11-01-2012
    Location
    Romania
    MS-Off Ver
    Excel 2007
    Posts
    2

    Talking Defined numbers - generator.

    I have these 7 numbers: 1,3,3,3,4,5,9. I would need a generator that mixes up these numbers between them generating all possible combinations but not repeating the same combination so every combinations is unique.

    Ex: 1333459, 3334591, 3345913, 3459133, 4591333, 4315933 an so on...

    Thanks you for your time.

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Defined numbers - generator.

    This should work

    Please Login or Register  to view this content.
    Result is pasted into cell A1
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Registered User
    Join Date
    11-01-2012
    Location
    Romania
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Defined numbers - generator.

    Unfortunately I get "The formula you typed contains an error.". Don't know what I'm doing wrong. Maybe you could attach the excel file to the reply?

    Thank you again for your time and effort!

  4. #4
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Defined numbers - generator.

    There are 840 unique permutations of the 7 values. This small macro, TEST, will list them in column A:

    Please Login or Register  to view this content.
    Macros are very easy to install and use:

    1. ALT-F11 brings up the VBE window
    2. ALT-I
    ALT-M opens a fresh module
    3. paste the stuff in and close the VBE window

    If you save the workbook, the macro will be saved with it.

    To remove the macro:

    1. bring up the VBE window as above
    2. clear the code out
    3. close the VBE window

    To use the macro from Excel:

    1. ALT-F8
    2. Select the macro (TEST)
    3. Touch RUN

    To learn more about macros in general, see:

    http://www.mvps.org/dmcritchie/excel/getstarted.htm

    Macros must be enabled for this to work!
    Last edited by Jakobshavn; 11-02-2012 at 10:28 AM. Reason: REMOVED BUG
    Gary's Student

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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