+ Reply to Thread
Results 1 to 6 of 6

Return all combinations of 4 numbers (0-3(

  1. #1
    Registered User
    Join Date
    08-31-2011
    Location
    Tallinn, Estonia
    MS-Off Ver
    Excel 2007
    Posts
    27

    Return all combinations of 4 numbers (0-3(

    Hello!

    Can someone please write a formula to return all combinations of numbers from 0-3?

    It would start like this:

    0 0 0 0
    0 0 0 1
    0 0 0 2
    0 0 0 3
    0 0 1 0
    0 0 2 0
    ....

    Thank you in advance!
    Last edited by Domyzon; 06-15-2019 at 04:42 PM.

  2. #2
    Forum Guru shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,658

    Re: Return all combinations of 4 numbers (0-3(

    Quote Originally Posted by Domyzon View Post
    Can someone please write a formula to return all combinations of numbers from 0-3?
    Your example is 0 to 4 ...

    A
    B
    C
    D
    E
    2
    0
    0
    0
    0
    A2: =MOD(INT(5 * (ROWS($D$2:A2) - 1) / 5 ^ COLUMNS($D$2:A2)), 5)
    3
    0
    0
    0
    1
    4
    0
    0
    0
    2
    5
    0
    0
    0
    3
    6
    0
    0
    0
    4
    7
    0
    0
    1
    0
    8
    0
    0
    1
    1
    9
    0
    0
    1
    2
    10
    0
    0
    1
    3
    11
    0
    0
    1
    4
    12
    0
    0
    2
    0
    13
    0
    0
    2
    1
    14
    0
    0
    2
    2
    15
    0
    0
    2
    3
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    08-31-2011
    Location
    Tallinn, Estonia
    MS-Off Ver
    Excel 2007
    Posts
    27

    Re: Return all combinations of 4 numbers (0-3(

    Sorry, I made a mistake in the example

    Corrected it now.

    Does the same formula apply?

  4. #4
    Forum Guru shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,658

    Re: Return all combinations of 4 numbers (0-3(

    Change the 5 to 4, all three places.

  5. #5
    Registered User
    Join Date
    08-31-2011
    Location
    Tallinn, Estonia
    MS-Off Ver
    Excel 2007
    Posts
    27

    Re: Return all combinations of 4 numbers (0-3(

    Works! Thank you!

  6. #6
    Forum Guru shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,658

    Re: Return all combinations of 4 numbers (0-3(

    You're welcome.

+ 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. Return r combinations from a group of n using Excel
    By Macros_2019 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-18-2019, 12:04 AM
  2. [SOLVED] To find all combinations of numbers from list of numbers that adds upto a specified number
    By Vivek2705 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-07-2019, 06:33 AM
  3. Return All combinations within SAME column
    By carpy0726 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-07-2016, 03:14 PM
  4. All possible combinations between 11 numbers
    By pandeirada in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 03-18-2016, 03:20 PM
  5. please help!!ALL COMBINATIONS REQUIRED FOR 5-DIGIT NUMBERs using numbers 0-9
    By natasha mirembe in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-08-2014, 01:43 PM
  6. [SOLVED] Different Combinations of 24 Numbers
    By danedw in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-20-2013, 07:03 AM
  7. Replies: 1
    Last Post: 04-15-2012, 09:23 AM

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