+ Reply to Thread
Results 1 to 4 of 4

Combinations of 1-6

  1. #1
    Registered User
    Join Date
    06-22-2015
    Location
    Rochester, NY
    MS-Off Ver
    2013
    Posts
    5

    Talking Combinations of 1-6

    Hi everyone! I'm having trouble coming up with a macro to run all possible combinations of the numbers 1-6. The set I'm specifically looking to see is all combinations (or permutations?) of the specified set that are only 3 numbers long. I've seen a bunch of different macros that do a similar function on here, but their specified set is different. When I try to change the numbers in those macros, it still runs the old macro, and not the new one (with my numbers). I'm guessing I don't understand them well enough to change all the data that needs to be changed.

    So, does anyone have a macro that would run all the different combinations of the numbers 1-6, only focusing on the ones that are 3 number long?

    Thanks so much for the help!

  2. #2
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: Combinations of 1-6

    Welcome to the forum!

    combin<=permut

    20 < 120 in the case of 6,3.

    Run this from a blank sheet.

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    06-22-2015
    Location
    Rochester, NY
    MS-Off Ver
    2013
    Posts
    5

    Thumbs up Re: Combinations of 1-6

    Thank you so much, Kenneth! This is exactly what I need! Life saver!

  4. #4
    Registered User
    Join Date
    09-16-2013
    Location
    Austin, Texas, USA
    MS-Off Ver
    Excel 2007 Home
    Posts
    17

    Re: Combinations of 1-6

    Open a new sheet. Click on Visual Basic in the Code section under the Developer tab (by default the Developer tab is not visible, so you have to activate it the first time under Excel Options). Click on Module in the Insert menu. Enter the subroutine below. Go back to the top line (Ctrl+Home) and press F5. In the main Excel window all of the 3-digit combinations of 1 through 6 will be in the first column starting at Row 2.
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Help with combinations
    By vidaLL in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-26-2013, 03:08 AM
  2. Finding possible combinations & listing the wanted combinations
    By Zoke in forum Excel Programming / VBA / Macros
    Replies: 30
    Last Post: 07-16-2012, 03:41 PM
  3. Combinations
    By mcatapano in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-16-2009, 12:49 AM
  4. Combinations
    By Peo Sjoblom in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-06-2005, 07:05 AM
  5. Combinations
    By osprey in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 01:05 AM

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