Any combination of 2 to 4 cards each valued 1 to 10 add up to 15? There's always brute force.
Put the following 3 tables somewhere and name them as in the underlined labels.
T2Cards
1 2
1 3
1 4
1 5
1 6
2 3
2 4
2 5
2 6
3 4
3 5
3 6
4 5
4 6
5 6
T3Cards
1 2 3
1 2 4
1 2 5
1 2 6
1 3 4
1 3 5
1 3 6
1 4 5
1 4 6
1 5 6
2 3 4
2 3 5
2 3 6
2 4 5
2 4 6
2 5 6
3 4 5
3 4 6
3 5 6
4 5 6
T4Cards
1 2 3 4
1 2 3 5
1 2 3 6
1 2 4 5
1 2 4 6
1 3 4 5
1 3 4 6
1 4 5 6
2 3 4 5
2 3 4 6
2 4 5 6
3 4 5 6
3 4 5 6
Then try these formulas.
G1:
Fill G1 down as far as needed.
Another approach. More named ranges.
T2C
*10*5*
*9*6*
*8*7*
T3C
*10*4*1*
*10*3*2*
*9*5*1*
*9*4*2*
*9*3*3*
*8*6*1*
*8*5*2*
*8*4*3*
*7*7*1*
*7*6*2*
*7*5*3*
*7*4*4*
*6*6*3*
*6*5*4*
*5*5*5*
T4C
*10*3*1*1*
*10*2*2*1*
*9*4*1*1*
*9*3*2*1*
*9*2*2*2*
*8*5*1*1*
*8*4*2*1*
*8*3*3*1*
*8*3*2*2*
*7*6*1*1*
*7*5*2*1*
*7*4*3*1*
*7*4*2*2*
*7*3*3*2*
*6*6*2*1*
*6*5*3*1*
*6*5*2*2*
*6*4*3*2*
*6*3*3*3*
*5*5*4*1*
*5*5*3*2*
*5*4*4*2*
*5*4*3*3*
*4*4*4*3*
Then
G1:
Fill down as far as needed.
This is slightly less brute force than the previous approach. Actually, you could combine T2C, T3C and T4C into a single range, maybe named T_C, then use the much shorter
G1:
Bookmarks