Short but useless answer to your question: Yes, there is a formula/function (or some combination of formulas/functions) that should allow you to model your problem. Beyond that, I don't see how to give you a specific answer, because I cannot understand exactly what you are doing to model this data.

Perhaps this question to spur the discussion on: What do you mean that you want to sum columns 1 through 6 and come up with 500? Are you trying to find which combination of values (one from each column) should add to 500? Or maybe some combination of the first row of values should add up to 500 (500=ax1+bx2+cx3+dx4+ex5+fx6+g)? Or perhaps any combination of 6 numbers in the table to add up to 500?