![]() |
combination of six digit number from 0 to 49
show the formula or the formula to get the combination,in each combination
the numbers should not be repeated. |
combination of six digit number from 0 to 49
"Divya" wrote:
show the formula or the formula to get the combination,in each combination the numbers should not be repeated. As responsed to your similar posting in .misc .. (pl refrain from multi-posting) 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 --- |
All times are GMT +1. The time now is 07:41 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com