Listing each different combination configuration

Brew

Well-known Member
Joined
Sep 29, 2003
Messages
1,569
Is there a formula or code that will take each 3 digit combination in the range C6:E90 and place the 6 different ways each combination can be configured into columns G, H, I, starting with row 6.
Example:
If c6:e6=056
Then, G6:I11=056,065,506,560,605,650
And if c7:e7=231
Then, G12:I17=231,213,321,312,123,132
and so on

Each digit is different within the combination, there are no duplicates
 
agihcam, how do i update as a separate code to execute the function if the data is in column N,O,P and the target results is in column R,S,T?
 
Upvote 0

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Code:
Sub sample() 
Dim i As Long 
Application.ScreenUpdating = False 
Range("r5:t" & Rows.Count).ClearContents 
Range("r5").Resize(, 3).Value = Array("h1", "h2", "h3") 
For i = 6 To Range("n" & Rows.Count).End(xlUp).Row 
Range("r" & Rows.Count).End(xlUp).Offset(1).Resize(, 3) = Array(Cells(i, "n"), Cells(i, "o"), Cells(i, "p")) 
Range("r" & Rows.Count).End(xlUp).Offset(1).Resize(, 3) = Array(Cells(i, "n"), Cells(i, "p"), Cells(i, "o")) 
Range("r" & Rows.Count).End(xlUp).Offset(1).Resize(, 3) = Array(Cells(i, "o"), Cells(i, "n"), Cells(i, "p")) 
Range("r" & Rows.Count).End(xlUp).Offset(1).Resize(, 3) = Array(Cells(i, "o"), Cells(i, "p"), Cells(i, "n")) 
Range("r" & Rows.Count).End(xlUp).Offset(1).Resize(, 3) = Array(Cells(i, "p"), Cells(i, "n"), Cells(i, "o")) 
Range("r" & Rows.Count).End(xlUp).Offset(1).Resize(, 3) = Array(Cells(i, "p"), Cells(i, "o"), Cells(i, "n")) 
Next 
Range("r5").Resize(, 3).ClearContents 
Application.ScreenUpdating = True 
End Sub
 
Upvote 0

Forum statistics

Threads
1,216,087
Messages
6,128,740
Members
449,466
Latest member
Peter Juhnke

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