GKIL67
Technical User
- Dec 1, 2009
- 44
Hello, this is quite complex...
I'm trying to come up with a function that for N numbers generates all possible combination in sets of K of them. The numbers N are not always sequential, they appear only once and they are fed as a string parameter, separated by ",". The K is not always known and it is passed as a parameter. Then the results-combinations are added in a Table, however the columns are every time adjusted according to K.
Example:
Combinations(K=5, N="1,2,22,33,35,39,45,47,49,51")
produces a total of 252 combinations-records which are listed in a Table with fields Field1 thru Field5.
Thank you in advance for any valuable feedback!
I'm trying to come up with a function that for N numbers generates all possible combination in sets of K of them. The numbers N are not always sequential, they appear only once and they are fed as a string parameter, separated by ",". The K is not always known and it is passed as a parameter. Then the results-combinations are added in a Table, however the columns are every time adjusted according to K.
Example:
Combinations(K=5, N="1,2,22,33,35,39,45,47,49,51")
produces a total of 252 combinations-records which are listed in a Table with fields Field1 thru Field5.
Thank you in advance for any valuable feedback!