This sounds like just the kind of problem that the build in Solver utility was designed for. You will need to figure out a suitable objective function (the function that you want to maximize) and figure out what you want to use for decision variables. Properly programmed, Solver should be able to help you maximize your function.

If you are unfamiliar with Excel's Solver utility, you might start here: http://www.solver.com/excel-solver-help