COMBIN and listing - Help Required Please.
Terry,
I don't know of a formula that will do it but this macro. Right click the
sheet tab, view code and paste this in.
Put your numbers in column A start ing in A1 and run the code. The
combinations will be output to column B.
Sub combinations()
last = Cells(Rows.Count, "A").End(xlUp).Row
For I = 1 To last - 2
For J = I + 1 To last - 1
For K = J + 1 To last
Cells(L + 1, 2) = Cells(I, 1) & Cells(J, 1) & Cells(K, 1)
L = L + 1
Next
Next
Next
End Sub
Mike
"Terry" wrote:
I am looking for some assistance to achieve the following which I
would prefer if possible to be able to carry out by using formula
functions rather than macros which are not my forte.
I have used the COMBIN formula to achieve the figures I require,
eg: COMBIN(6,3) to give me 20
what I need is a formula that will actually list the 20 unique
combinations,
ie:
1 2 3
1 2 4
1 2 5
1 2 6
2 3 4
2 3 5
etc. etc.
I have many of these of varying figures to carry out and to enter them
by hand would be laborious and open to human error.
I would appreciate any help or advise.
Thank you in advance,
Terry.
|