Excel Solver for Optimization
Excel Solver is a free add-in that finds the combination of input values that maximizes, minimizes, or hits a target for a formula, while respecting constraints you define โ it's the multi-variable upgrade to Goal Seek. Enable it once through File → Options → Add-ins, then set an objective cell, the variable cells Solver can change, and any constraints on the Data tab.
Quick answer: Enable Solver via File → Options → Add-ins → check "Solver Add-in," then find it under Data → Analyze → Solver. Set an Objective cell (what to maximize, minimize, or match to a value), the Variable cells Solver may change, and Constraints like B4 <= 100. Use the Simplex LP method for linear problems, GRG Nonlinear for smooth nonlinear ones, and Evolutionary for messy, discontinuous problems.
How do I enable Solver in Excel?
Solver ships with Excel but isn't turned on by default โ enable it once through File → Options → Add-ins, and it stays available on the Data tab afterward.
1. File โ Options โ Add-ins
2. Manage: Excel Add-ins โ Go
3. Check "Solver Add-in" โ OK
4. Now available: Data tab โ Analyze group โ Solver
How do I use Solver to maximize production profit?
Define an objective cell that computes total profit from the units of each product, let Solver vary the unit quantities, and cap them with labor and material constraints so it can't exceed the resources you actually have.
Problem: Maximize profit with limited resources
Setup:
Product A: $40 profit, 2 hours labor, 3 units material
Product B: $30 profit, 1 hour labor, 2 units material
Constraints:
- Maximum 100 hours labor available
- Maximum 120 units material available
Cells:
B1: Units of A (to optimize)
B2: Units of B (to optimize)
B3: =40*B1 + 30*B2 // Total profit (objective)
B4: =2*B1 + 1*B2 // Labor used
B5: =3*B1 + 2*B2 // Material used
Solver Settings:
Objective: B3 (maximize)
By changing: B1:B2
Constraints:
- B4 <= 100 (labor limit)
- B5 <= 120 (material limit)
- B1 >= 0, B2 >= 0 (can't produce negative units)
Result: Optimal production mix for maximum profit
How do I use Solver for budget allocation?
Set the objective to maximize total conversions, let Solver vary the spend per channel, and constrain the total to your budget with a minimum and maximum for each channel.
Problem: Allocate $10,000 marketing budget across channels
Channels: Social Media, Email, PPC, Content
Each has different cost per lead and conversion rates
Objective: Maximize total conversions
Constraint: Total spend <= $10,000
Each channel minimum $500, maximum $4,000
Solver finds optimal allocation across all channels
Can Solver handle staff scheduling problems?
Yes โ set the objective to minimize total employees, and add constraints that each shift's staffing meets the minimum headcount required for that day.
Problem: Minimum staff to meet hourly demand
Requirements:
Mon-Fri 9am-5pm: 10 employees needed
Weekends: 5 employees needed
Employees work 5 consecutive days
Objective: Minimize total employees
Constraints: Meet minimum requirements each day
Solver determines optimal hiring schedule
What are the three things Solver needs to run?
Every Solver model needs three pieces: an objective cell (what to maximize, minimize, or hit), variable cells Solver is allowed to change, and constraints that limit how far it can push those variables.
1. Define Objective Cell
What to optimize (maximize, minimize, or target value)
Example: Maximize profit, minimize cost
2. Variable Cells
Cells Solver can change to reach objective
Example: Production quantities, budget allocations
3. Constraints
Limitations and requirements
Examples:
- Budget <= $10,000
- Inventory >= 100
- Labor hours <= 40
- Variables must be integers
- Variables >= 0 (non-negative)
Which Solver method should I choose?
Use Simplex LP for linear problems (fastest and most reliable), GRG Nonlinear for smooth nonlinear problems, and Evolutionary only for messy, discontinuous problems the other two can't handle.
Solving Method:
- Simplex LP: Linear problems (best for most cases)
- GRG Nonlinear: Smooth nonlinear problems
- Evolutionary: Complex, discontinuous problems
Options:
- Max Time: How long to search for solution
- Iterations: Maximum calculation iterations
- Precision: How close to target
- Integer Constraints: Force whole numbers
What are common Solver use cases?
Solver is best known for portfolio optimization, transportation/shipping cost minimization, and product-mix problems โ anything where several inputs interact under real-world limits.
Portfolio Optimization
Maximize returns while:
- Meeting risk tolerance
- Diversification requirements
- Minimum/maximum position sizes
Transportation Problem
Minimize shipping costs from:
- Multiple warehouses
- To multiple destinations
- With capacity constraints
Product Mix
Maximize profit given:
- Limited raw materials
- Production capacity
- Minimum order quantities
- Storage limitations
How does Solver differ from Goal Seek?
Goal Seek changes exactly one input to hit exactly one value with no constraints; Solver changes multiple inputs at once, respects constraints, and can maximize or minimize rather than just match a target.
| Goal Seek | Solver |
|---|---|
| Changes 1 variable | Changes multiple variables |
| No constraints | Handles many constraints |
| Reaches specific value | Maximizes/minimizes |
| Simple problems | Complex optimization |
What tips make Solver models more reliable?
Start with reasonable initial values, add constraints one at a time so you can see which one changes the result, and use Simplex LP whenever your problem is actually linear โ it's the fastest and most consistent method.
- Start with reasonable initial values
- Add constraints one at a time and test
- Use Simplex LP for linear problems (fastest)
- Make integer constraints only when necessary
- Save your model to rerun with different parameters
Pro Tip: Solver can save multiple scenarios. After finding a solution, use Scenario Manager to save it, then run Solver again with different constraints to compare options.
โ Back to Excel Tips