I need help please. I'm trying to find a formula that would generate all possible combinations of 5 numbers that range from 0 to 6 and add up to 16 or 17. For example 0+3+3+4+6=16 or 1+2+3+5+6=17. Then I need all numbers from 0 to 9 that when added equal 18 and 28. for example, 0+0+0+9+9=18 or 5+0+9+5+9=28 Thank you in advance
>>7798740
create a dataset from 0 to 99999.
create variables for each digit.
apply tests to drop all those that do not satisfy your conditions.
It's not that efficient but that's easy.
You can even do that in excel.