bigmacfann
New Member
- Joined
- Aug 26, 2005
- Messages
- 44
What I am trying to do is find out how many combinations of 5 numbers from 1-9 equal 13 when added up. For example, 1+1+1+1+9=13, 1+2+1+1+8=13, 1+3+1+1+7=13, etc. However, I don't want the combinations that are the same as the ones before such as 1+1+1+1+9 is the same thing as 9+1+1+1+1, 1+9+1+1+1. I would only want 1 combination total with four 1's and one 9, three 1's a 2 and an 8, and so on... Is there a macro or possibly a function in excel that will do this? I should have stayed awake in algebra when the teacher was teaching permutations and combinations! I would want the combinations to show up for me automatically starting at A1. A1=1, B1=1, C1=1, D1=1, E1=9. then the next combination starting at A2. Can someone help me with this? Thank you in advance.