Thanks for the response again sir Winon, I think you're right I totally forgot about the limits of excel. But how about if I just want to do a VBA program for the same problem but now I will only account for combinations that use multiples of 5.

Example:
Col1 : 45
Col2: 5
Col3: 0
col4: 0
col5: 0
col6: 0
col7: 0

Col1 : 45
Col2: 0
Col3: 5
col4: 0
col5: 0
col6: 0
col7: 0

(until col 7 =5)

Col1 : 35
Col2: 5
Col3: 5
col4: 5
col5: 0
col6: 0
col7: 0

(so on.. )

perhaps until:

Col1 : 5
Col2: 0
Col3: 0
col4: 0
col5: 0
col6: 0
col7: 45

I think this is more feasible. But I really am having a tough time crafting the formula for this. Hope someone can assist. Thank you very much!