Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hello
who can convert that into vba the goal is to find the index of the combination Index Mapping By creating a MAPPING function (CombinationToIndex) that assigns an INDEX value to each combination or permutation according to its position in the full list, we can represent individual combinations by simple numbers. With an inverse function (IndexToCombination) that returns the combination for a given index value, we can then generate any subset of all possible combinations from a given starting point like this: Code: StartIndex = CombinationToIndex(50, 6, "1, 7, 23, 35, 47, 49") For CombNo = StartIndex To StartIndex + 99 Debug.Print IndexToCombination(50, 6, CombNo) Next thank you |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
question about debug.print | Excel Programming | |||
place output of several debug.print statements on the same line | Excel Programming | |||
debug.print range "full" address | Excel Programming | |||
Debug.Print in a WITH procedure? | Excel Programming | |||
Debug.Print | Excel Programming |