Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
jayock02
 
Posts: n/a
Default triadic combinations of words


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

  #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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Spell Checking - Special Words Not Picked Up by Excel Hans Emilio Excel Discussion (Misc queries) 4 May 25th 05 02:25 PM
Can I have spell check ignore errors and alert me to real words? JenLynFish Excel Discussion (Misc queries) 1 May 9th 05 06:22 PM
how to change numbers into words, Mukesh Dhoot Excel Discussion (Misc queries) 1 March 19th 05 11:48 AM
Creating a Microsoft Words document from an existing Excel spreads ringo tan New Users to Excel 1 December 30th 04 08:01 PM
How do I make my settings suggest previous words as I start to ty. Connie Excel Discussion (Misc queries) 2 December 1st 04 06:02 PM


All times are GMT +1. The time now is 07:51 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"