# Budget-constrained optimization with a spreadsheet solver

Learn how a spreadsheet solver handles budget-constrained optimization: set the objective, changing cells and constraints, include integer choices, and read the result.

Budget-constrained optimization with a spreadsheet solver means letting the solver pick values for your decision cells so a total objective improves while the cost stays within a budget limit. You describe the choices in cells, write formulas for cost and value, and add constraints that tie the two together. The solver then searches for the combination that fits the money available. This page explains the setup, the constraint types and how to read what comes back. 

## Setting up the objective and variables 

The objective cell holds the formula you want to maximize or minimize, such as total value from a set of selected items. Changing variable cells hold the decisions the solver may adjust, and each one stands for a selectable line in your list. A separate formula cell totals the cost of the selected options so the budget limit has something to check. Label these cells clearly, because a solver run is only as clear as the model behind it. 

## Writing the budget limit as a constraint 

A budget limit becomes a constraint that compares the total cost cell against the money available. The constraint can be an upper bound on spending, and it may also carry a lower bound if a minimum spend applies. Every constraint in spreadsheet optimization refers to cells, not to typed numbers alone, so the limit updates when you change an input. Keep the cost formula consistent with the variable cells, or the solver will enforce a limit on the wrong total. 

## Adding integer constraints to the model 

Integer constraints force a variable cell to take a whole number, which suits decisions about how many units of an item to take. A binary form restricts the cell to zero or one, so it acts as a yes or no switch for including a listing. Excel Solver offers these settings in its constraint dialog, and they change the search from smooth allocation to a selection problem. Expect longer solve times as the number of integer variables grows, because the solver must compare discrete combinations. 

## Questions about spreadsheet budget optimization 

### What does a budget-constrained optimization spreadsheet solver actually do? 

A budget-constrained optimization spreadsheet solver adjusts your changing variable cells to improve an objective while keeping total cost inside the budget limit. You supply the formulas for cost and value, and the solver searches combinations that satisfy every constraint. The output is a set of cell values, not a recommendation you must accept. Checking the result against your own figures stays your job. 

### Which cells do I mark as the objective and the changing variables? 

The objective cell holds the single formula you want to maximize or minimize, such as total value across selected items. Changing variable cells hold the decisions, and the solver writes new values into them on each run. A cost formula cell should total spending from those same variables so the budget constraint can read it. Mixing unrelated calculations into these cells makes the model hard to audit. 

### How do integer constraints change the answer? 

Integer constraints restrict a variable to whole numbers, so the solver cannot split an item into fractions. A binary setting limits the cell to zero or one and turns it into an include or exclude switch for a listing. These constraints make the problem a selection task rather than a smooth allocation. Solving can take longer as more integer variables enter the model. 

### Why does the solver report that it cannot find a feasible solution? 

A solver reports no feasible solution when no combination of variable values satisfies all constraints at once. The budget limit may be below the cost of any allowed selection, or two constraints may contradict each other. Check the cost formula, the direction of each constraint and the integer settings before rerunning. Relaxing one constraint at a time shows which limit blocks the model.
