Permutations.

serge

Well-known Member
Joined
Oct 8, 2008
Messages
1,404
Office Version
  1. 2007
Platform
  1. Windows
Hi,
I'm looking for a formula that will create all permutations possible on 4 rows with the 9 digits in A2:A10, starting in columns C2:C5 to the right, I believe it should be a total of 256 combinations. Thank you.

Permutations.PNG
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Actualy my table example is wrong it should be more like this one.

Permutations 2.PNG


I kind of get lost with those digits that's why a formula would be so helpful.
 
Upvote 0
You're right forget it then, thank you Joe4.
 
Upvote 0
There may be a way to do it using formulas, but it might use some of the newer functions (if you are really still using Office 2007, you may not have the needed functions available).
In any event, those formulas are beyond me!

If I had to do something like this, I would probably use VBA and use nested loops.
Not the most efficient, but should get the job done!
 
Upvote 0
Thank you Joe4, but its way to many for what I'm doing, thank you.
 
Upvote 0
OK, you are welcome.
 
Upvote 0
Hi, see the linked file for a possible solution...

The formulas used in the table:
D2: =IF(C5=9,IF(C4=9,IF(C3=9,IF(C2=9,1,C2+1),C2),C2),C2) (Range: D2:IRK2)
D3: =IF(C5=9,IF(C4=9,IF(C3=9,1,C3+1),C3),C3) (Range: D3:IRK3)
D4: =IF(C5=9,IF(C4=9,1,C4+1),C4) (Range: D4:IRK4)
D5: =IF(C5=9,1,C5+1) (Range: D5:IRK5)

Variations.xlsx
 
Upvote 0

Forum statistics

Threads
1,215,028
Messages
6,122,749
Members
449,094
Latest member
dsharae57

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top