Generating combinations.

serge

Well-known Member
Joined
Oct 8, 2008
Messages
1,444
Office Version
  1. 2007
Platform
  1. Windows
Hi everyone,
I have 3 digits 1,2,3 and 7 columns.
I need to create all possible combinations, starting in B3:H3 which formula could do the job ? Thank you.
See example below.

22.PNG
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
THANK YOU SO MUCH Eric, that's exactly what I needed, it work perfect, you save me so much time.
 
Upvote 0
I may need exactly the same thing but in 8 columns, what need to be change in the formula, please ?
Thank you.
 
Upvote 0
No change to the formula, just add the 8th column on the left.

Just to explain a bit:

=MOD(INT((ROW()-3)/(3^(COLUMNS(B:$H)-1))),3)+1

The red 3 is the starting row of your range. The green 3s are how high you go before repeating (1,2,3,1,2,3, etc.). The purple part is a way to get a counter starting at 1 on the right, going up as you drag the formula to the left. So the right most column should match the letter.
 
Upvote 0
Thank you Eric, now I understand better with your explanation, I really appreciate your help.
 
Upvote 0

Forum statistics

Threads
1,223,900
Messages
6,175,276
Members
452,629
Latest member
SahilPolekar

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