View Single Post
  #2   Report Post  
JMB
 
Posts: n/a
Default

Nested loops work well for this type of stuff. Copy and paste the macro
below into a code module, replace the array1 = Array("Zero", "One",.......

for whatever your 10 words are and run the macro on an empty excel
worksheet.



Option Base 1

Sub test()
Dim Array1()
Dim i As Integer
Dim t As Integer
Dim z As Integer
Dim count As Integer

Array1 = Array("Zero", "One", "Two", "Three", "Four", _
"Five", "Six", "Seven", "Eight", "Nine")
count = 0

For i = LBound(Array1) To UBound(Array1) - 2
For t = i + 1 To UBound(Array1) - 1
For z = t + 1 To UBound(Array1)
count = count + 1
Cells(count, 1).Value = Array1(i) & ", " _
& Array1(t) & ", " & Array1(z)
Next z
Next t
Next i

End Sub


"jayock02" wrote:


I am doing my masters thesis and have had difficulty with the following.
I have computed the number of combinations of three words when
specifying via the combin formula (10 words, 3 words or numbers
representing the words in each, giving the number of combinations 120).
But how can I get the actual triads of the combinations to display....I
need to display all the 120 combinations instead of just getting the
number of them. Any help? :)


--
jayock02
------------------------------------------------------------------------
jayock02's Profile: http://www.excelforum.com/member.php...o&userid=24393
View this thread: http://www.excelforum.com/showthread...hreadid=379975