LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 86
Default Generate table of combinations

Can anyone point me to an algorithm or VBA code to produce a table of
combination of items. For example if the items are 1,2,3,4,5 then the code
would generate:

1
1, 2
1, 2, 3
1, 2, 3, 4
1, 2, 3, 5
1, 2, 3, 4, 5
1, 2, 4
1, 2, 4, 5
1, 2, 5
1, 3
1, 3, 4
1, 3, 4, 5
1, 3, 5
1, 4
1, 4, 5
1, 5
2
2, 3
2, 3, 4
2, 3, 4, 5
2, 3, 5
2, 4
2, 4, 5
2, 5
3
3, 4
3, 4, 5
3, 5
4
4, 5
5

Similar for dog, cat, house
--
Gary's Student
 
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
How to create a macro in excel so that it can generate a list ofunique records using all permutations and combinations of the data in eachrow ad column Rizwan[_4_] Excel Discussion (Misc queries) 1 August 6th 09 01:44 PM
How to generate a list from a table Prashant Rao Excel Discussion (Misc queries) 1 November 14th 07 10:17 PM
Sorting of a pivot table by outer and inner row field combinations andygoon Excel Discussion (Misc queries) 1 February 5th 07 11:02 PM
Generate Random Number Table Tim Bieri Excel Programming 4 February 10th 05 06:35 PM
Generate all possible combinations from three data sets? Flamikey[_6_] Excel Programming 2 October 8th 04 11:20 PM


All times are GMT +1. The time now is 01:17 PM.

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

About Us

"It's about Microsoft Excel"