Hello, I have a various difficulties within this excel problem.
counting combinations.xlsx
I must calculate all combinations of 7 numbers that give sum of 100. Numbers must be in interval from 1 to 39.
First condition is that sum of numbers must be changeable (i mentioned before sum of 100 to be simpler so I typed number 100 in the document). The sum can be also 150 or 88 for example, depending what number is entered in cell K2.
Second condition is that every combination must be unique (no such things like 7,8,9,10,16,20,30 and 30,20,16,10,9,8,7 and 7,8,10,9,3,20,16). This is example how results shouldn't be because all 3 combinations have same numbers only with different position/order). Only one combination of same numbers is possible and numbers must be ordered from smaller to larger numbers).
Is this possible to do, what is best option: functions or maybe some macro?
Bookmarks