# Return all combinations of 4 numbers (0-3(

1. ## 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
....

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

Originally Posted by Domyzon
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

3. ## 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. ## Re: Return all combinations of 4 numbers (0-3(

Change the 5 to 4, all three places.

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

Works! Thank you!

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

You're welcome.

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

#### 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