Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
combinatiion of 6 digit numbers from 0-49
kindly tell me how do i get the various combinations of six digit number from
0-49.The number should not be repeated in any of the combinations |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
combinatiion of 6 digit numbers from 0-49
"Divya" wrote:
kindly tell me how do i get the various combinations of six digit number from 0-49.The number should not be repeated in any of the combinations One way is to use Myrna Larson's power subroutine .. Try this sample from my archives which contains an implementation: http://www.savefile.com/files/518493 MyrnaLarson_Combination_Permutation.xls (full details inside, ready to go <g) In the sample file, In Sheet1, 1. Enter the letter C or P in A1 (C = combinations, P = permutations), ie enter: C 2. Enter the number of items involved per combo in A2, ie enter: 6 3. Enter/List the 50 items in A3 down, ie list in A3:A52: 0, 1, 2, ... 49 4. Select A1 (this selection is required), then click the button ListPermutations to run the sub ListPermutations 5. The results will be written to a new sheet (just to the left), and appear like below, in a zig-zag manner until all combos are exhausted: 0, 1, 2, 3, 4, 5 0, 1, 2, 3, 4, 6 0, 1, 2, 3, 4, 7 ..... ..... Note that what you want generated is a "Pick 6 out of 50", which works out to a staggering: =COMBIN(50,6) = 15,890,700 combos As a single sheet in xl97 to xl2003 houses: =65536 rows x 256 cols = 16,777,216 cells so almost the entire sheet would be populated when you run your "Pick 6 out of 50" The sub would certainly need time to complete its run/generation For a start, suggest that you go easy on the number of combos, maybe run a "Pick 2 out of 50" first, ie enter in A2: 2, instead of 6, then click the button. You should see all 1225 combos [=COMBIN(50,2)] generated in Sheet2 -- Max Singapore http://savefile.com/projects/236895 xdemechanik --- |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Store numbers starting with zero as 2 digit numbers | Excel Discussion (Misc queries) | |||
15+ digit numbers | Excel Worksheet Functions | |||
what is the minimum numbers set for 4 digit numbers from 0000 to 9 | Excel Discussion (Misc queries) | |||
16 digit numbers | Excel Discussion (Misc queries) | |||
16 DIGIT NUMBERS IN CELL WITHOUT LAST DIGIT BEING A ZERO | Excel Worksheet Functions |