Protected Learning Content

AICPE Gurukul content is created for learning purposes. Printing, copying and unauthorized reuse are restricted.

AICPE Learning Hub Advanced Excel
Chapter 29
Solver and Optimization
Chapter 29 | Decision Science with Excel

Solver and Optimization

Convert business limits, targets and choices into a structured Excel model that identifies the best feasible decision for profit, cost, production, workforce, logistics and budget allocation.

Objective CellMaximize profit, minimize cost or reach a required target.
Decision VariablesIdentify the cells Solver is permitted to change.
ConstraintsRepresent capacity, demand, budget and policy limits.
Solving MethodsSelect Simplex LP, GRG Nonlinear or Evolutionary appropriately.
Advanced Excel • Chapter 29 of 40
Learning Objectives

After This Chapter, You Will Be Able To

Design and validate optimization models that convert business rules into defendable decisions.

Structure Models

Separate decision variables, formulas, assumptions, constraints and results clearly.

Configure Solver

Set an objective, changing cells, constraints and the correct solving method.

Optimize Decisions

Maximize profit, minimize cost and allocate limited resources efficiently.

Validate Results

Check feasibility, sensitivity, assumptions and practical business usability.

Optimization Foundation

Turn a Business Decision into a Mathematical Model

Optimization does not merely calculate an answer. It searches among feasible alternatives and identifies the best result according to a defined objective.

1 What Solver and Optimization Mean

Optimization is the process of finding the best possible value of an objective while respecting limits. Excel Solver changes selected cells repeatedly, recalculates the workbook and searches for a feasible combination that improves the objective.

Definition: An optimization model contains decision variables, an objective formula and constraints. Solver changes the decision variables to maximize, minimize or reach the objective without violating the constraints.
ProductionChoose product quantities within labour, material and machine capacity.
DistributionAllocate shipments while minimizing transport cost and meeting demand.
WorkforceAssign staff or shifts while satisfying workload and policy requirements.
BudgetAllocate funds across campaigns or projects under a total spending limit.

The Four Essential Model Components

Decision VariablesCells Solver may change
ObjectiveThe result to maximize, minimize or target
FormulasRelationships connecting choices to results
ConstraintsRules that define feasible solutions
Professional Tip: Solver cannot repair a poorly designed model. First confirm that every output formula responds correctly when you manually change the decision cells.

Practical Experiment 1: Identify the Optimization Components

Analyze a small production decision before opening Solver.

Step 1: Define

List two products, their unit profit and the resources each product consumes.

Step 2: Classify

Mark the quantity cells, total-profit formula and capacity limits.

Step 3: Test

Change quantities manually and confirm profit and resource use update correctly.

Learning Output: A clear optimization map containing variables, objective and constraints.

2 Build a Professional Optimization Workbook

A reliable Solver workbook separates assumptions from choices and results. This improves auditability, reduces accidental overwriting and makes the model easier to explain.

1Define

State the exact business decision and optimization objective.

2Input

Enter verified profit, cost, capacity and demand assumptions.

3Choose

Create dedicated cells for decision variables.

4Calculate

Connect choices to objective and resource-use formulas.

5Constrain

Translate every real-world limit into a worksheet rule.

6Validate

Check feasibility, business logic and implementation readiness.

Recommended Worksheet Zones

ZoneContainsRecommended Control
AssumptionsUnit profit, costs, hours, capacities, demand and policy limitsUse consistent colours, units and source notes
Decision VariablesQuantities, allocations, selections or schedules Solver changesKeep together and avoid formulas in these cells
CalculationsObjective, resource usage, demand served and constraint balancesUse transparent formulas such as SUMPRODUCT
ControlsFeasibility checks, slack, exceptions and reconciliation totalsDisplay PASS/FAIL or remaining capacity clearly
OutputRecommended decisions, objective result and management summaryPresent units, assumptions and caveats
=SUMPRODUCT(UnitProfit,DecisionQty)

Typical total-profit objective.

=SUMPRODUCT(ResourcePerUnit,DecisionQty)

Total resource consumed by the chosen plan.

=Capacity-ResourceUsed

Remaining capacity or slack.

=IF(Used<=Capacity,"PASS","FAIL")

Simple worksheet constraint check.

Practical Experiment 2: Create a Solver-Ready Model Layout

Build the five worksheet zones for a two-product planning model.

Step 1: Format

Create separate assumption, variable, calculation, control and output blocks.

Step 2: Link

Use SUMPRODUCT formulas for profit and each resource requirement.

Step 3: Verify

Enter sample quantities and confirm every control cell responds correctly.

Learning Output: A clean, auditable and Solver-ready worksheet architecture.
Solver Setup

Enable Solver and Configure Every Dialog Box Field

Correct configuration is as important as correct formulas. A missing constraint or wrong changing-cell range can produce an unusable recommendation.

3 Enable and Open the Solver Add-In

In desktop Excel, open File → Options → Add-ins. At the bottom, choose Excel Add-ins in the Manage box, click Go, select Solver Add-in and confirm. Solver then appears on the Data tab.

Navigation: Data tab → Analysis group → Solver. Save the workbook after configuring the model and Solver settings.

Solver Parameters Dialog

Set ObjectiveSelect the single formula cell representing profit, cost, distance, time or another final result.
To: Max / Min / Value OfChoose whether the objective should be maximized, minimized or brought to a specific target.
By Changing Variable CellsSelect only the decision cells Solver is allowed to modify.
Subject to the ConstraintsAdd capacity, demand, policy, non-negativity, integer and binary restrictions.
Select a Solving MethodChoose Simplex LP, GRG Nonlinear or Evolutionary based on the formula relationships.

Common Constraint Operators

OperatorMeaningExample
<=Cannot exceed a limitTotal labour hours <= Available labour hours
>=Must meet a minimumUnits supplied >= Minimum demand
=Must equal a required valueTotal allocation = Approved budget
intDecision must be a whole numberNumber of workers, trucks or machines
binDecision must be zero or oneSelect or reject a project
difSelected decision cells must contain different integersAssign distinct positions or ranks where appropriate
Important: Do not select input assumptions or formula cells as changing variables. Solver should change only genuine decisions.

Practical Experiment 3: Configure a Target-Profit Model

Set Solver to reach a required contribution amount through one changeable sales-volume cell.

Step 1: Build

Create price, variable cost, fixed cost, volume and profit formulas.

Step 2: Configure

Set profit as the objective, choose Value Of and select volume as the changing cell.

Step 3: Validate

Apply non-negative and whole-number rules, solve and verify the target manually.

Learning Output: A correctly configured one-variable Solver model.
Linear Optimization

Build Product-Mix and Allocation Models with Simplex LP

Linear programming is suitable when the objective and every constraint are linear combinations of the decision variables.

4 Understand Linear Relationships

A model is linear when each variable is multiplied only by a constant and variables are added together. The model should not multiply decision variables by one another, raise them to powers or place them inside nonlinear functions.

Linear Example: Profit = $500 × Product A Quantity + $350 × Product B Quantity. Each unit contributes a fixed amount, so the relationship is linear.

Usually Linear

  • Product mix with fixed unit profit
  • Transport allocation with fixed cost per unit
  • Work-hour allocation
  • Budget allocation with fixed return per amount
  • Blending with fixed ingredient coefficients

Usually Nonlinear

  • Price changes demand
  • Interest compounds with a decision variable
  • Variables are multiplied together
  • Square, exponential or logarithmic relationships
  • Complex step or discontinuous rules

Product-Mix Model Structure

ProductUnit ProfitLabour HoursMaterial KgDecision Quantity
Product A$50023Solver changes
Product B$35014Solver changes
Total Profit = SUMPRODUCT(Unit Profit, Quantity)

The objective cell to maximize.

Labour Used = SUMPRODUCT(Labour per Unit, Quantity)

Constraint: labour used must not exceed capacity.

Material Used = SUMPRODUCT(Material per Unit, Quantity)

Constraint: material used must not exceed available stock.

Quantity >= 0 and Quantity = Integer

Prevents negative or fractional production where inappropriate.

Simplex LP: Choose this method for genuinely linear models. In Solver Options, the Assume Linear Model setting may help when the workbook has been designed linearly.

Practical Experiment 4: Maximize Product-Mix Profit

Find the most profitable production quantities under labour and material limits.

Step 1: Model

Create decision cells for Product A and B quantities and SUMPRODUCT resource formulas.

Step 2: Solve

Maximize total profit with labour, material, non-negative and integer constraints.

Step 3: Interpret

Record unused capacity and explain why the recommended mix is optimal.

Learning Output: A solved linear product-mix model with documented constraints.

5 Minimize Cost and Allocate Resources

Optimization is not limited to profit. Many business models minimize transport cost, overtime, waiting time, raw-material cost, staffing expense or total distance while meeting service requirements.

TransportationShip from sources to destinations at minimum cost.
Staff SchedulingMeet hourly demand with minimum staffing cost.
BlendingMeet quality specifications at minimum ingredient cost.
MarketingAllocate budget while meeting reach, channel and policy rules.

Equality and Balance Constraints

A transport or allocation model often requires row and column totals. Supply leaving a source cannot exceed available supply, while delivery to a destination must meet demand. Totals and units must reconcile before the result is accepted.

Unit Discipline: Do not mix hours with minutes, kilograms with tonnes or monthly values with annual values. Solver will calculate without understanding inconsistent units.

Practical Experiment 5: Minimize Distribution Cost

Allocate shipments from two warehouses to three markets.

Step 1: Arrange

Create a shipment matrix and cost-per-unit matrix with matching dimensions.

Step 2: Constrain

Limit source totals by supply and require destination totals to meet demand.

Step 3: Review

Minimize SUMPRODUCT of cost and shipment quantities, then reconcile all totals.

Learning Output: A minimum-cost distribution allocation with supply and demand balance.
Solving Methods

Select the Method that Matches the Model

Solver methods use different search strategies. The correct choice depends on formula behaviour, smoothness and the presence of discrete decisions.

6 Simplex LP, GRG Nonlinear and Evolutionary

Simplex LP

Use when objective and constraints are linear. It is usually the preferred method for product mix, transportation and fixed-rate allocation models.

GRG Nonlinear

Use for smooth nonlinear formulas. Starting values matter, and different starting points may lead to different local solutions.

Evolutionary

Use for non-smooth, discontinuous or difficult models, including logic-heavy formulas. It may require more time and careful settings.

QuestionSimplex LPGRG NonlinearEvolutionary
Are all relationships linear?YesNot requiredNot required
Are formulas smooth and continuous?YesNormally yesNot necessary
Can the model contain abrupt IF-based jumps?AvoidAvoid where possibleMore suitable
Does the starting value matter?Usually lessYesPopulation-based search reduces dependence but settings still matter
Typical strengthFast linear optimizationSmooth nonlinear optimizationComplex or non-smooth search

Nonlinear Example

Suppose selling price is a decision variable and demand decreases as price increases. Revenue becomes Price × Demand(Price), so the decision variable affects more than one part of the formula and the relationship is nonlinear.

Demand = BaseDemand - Sensitivity × Price

Demand changes with the selected selling price.

Profit = (Price - UnitCost) × Demand

Price appears in multiple connected terms, creating a nonlinear objective.

Starting Values: For nonlinear models, test several reasonable starting points. A Solver result may be locally best without being the best possible result across the entire decision range.

Practical Experiment 6: Optimize Selling Price

Find a price that maximizes profit when demand changes with price.

Step 1: Build

Create a demand formula linked to the price decision cell.

Step 2: Solve

Use GRG Nonlinear with practical minimum and maximum price constraints.

Step 3: Retest

Run the model from several starting prices and compare the final solutions.

Learning Output: A nonlinear pricing model with starting-point validation.
Discrete Decisions

Use Integer and Binary Constraints for Real-World Choices

Many decisions cannot be fractional. A business cannot normally deploy 2.4 vehicles, approve 0.6 of a project or open part of a branch.

7 Whole-Number, Yes/No and Logical Decisions

An integer constraint forces a decision cell to contain a whole number. A binary constraint restricts a decision to 0 or 1, commonly representing No/Yes, Reject/Select or Closed/Open.

Integer

Use for employees, machines, trucks, batches, rooms or other indivisible quantities.

Binary

Use for project selection, vendor approval, branch opening or campaign activation.

Linking Constraint

Connect binary selection with quantity, cost or capacity using a logical mathematical rule.

Typical Binary Linking Formulas

Allocation <= Maximum × Selected

If Selected is 0, allocation must be 0. If Selected is 1, allocation may rise to the maximum.

Allocation >= Minimum × Selected

If an option is selected, it must receive at least the specified minimum allocation.

SUM(SelectedProjects) <= 4

Choose no more than four projects.

ProjectA + ProjectB <= 1

Projects A and B are mutually exclusive.

Model Size: Integer and binary restrictions make optimization more difficult. Add only genuine discrete rules and avoid unnecessary complexity.

Practical Experiment 7: Select Projects under a Budget

Choose the best combination of proposed projects using binary variables.

Step 1: List

Enter project cost, expected benefit and a 0/1 selection cell for each proposal.

Step 2: Constrain

Keep total cost within budget and restrict selection cells to binary values.

Step 3: Explain

Maximize total benefit and document why selected projects outperform alternatives.

Learning Output: A project-portfolio model using binary decisions and budget limits.
Result Analysis

Interpret Solver Results, Reports and Warning Messages

A technically solved model still requires feasibility checks, business review and clear communication before implementation.

8 Keep, Restore and Document the Solution

After Solver finishes, review the status message. Choose Keep Solver Solution only after checking decision cells, objective value and all constraints. Restore original values when the result is infeasible, unrealistic or based on incorrect assumptions.

Result Validation Checklist

  • Every decision variable is within its permitted range.
  • All capacity, demand, budget and policy constraints are satisfied.
  • The objective formula matches the intended business goal.
  • Integer and binary decisions contain valid values.
  • Units and reporting periods are consistent.
  • The recommended plan can actually be implemented.
  • A manual or alternative-scenario check supports the result.
ReportPurposeImportant Interpretation
Answer ReportShows original and final values plus constraint statusUseful for documenting the recommended solution and binding limits
Sensitivity ReportAvailable for suitable linear continuous modelsShows reduced costs, shadow prices and allowable changes
Limits ReportShows objective values when variables move toward limitsHelps review how individual decisions may affect the objective

Binding Constraints, Slack and Shadow Price

A binding constraint is fully used at the solution. Slack is unused capacity for a non-binding limit. In a linear sensitivity report, a shadow price estimates how much the objective may improve for one additional unit of a constrained resource, within the stated allowable range.

Interpret Carefully: Sensitivity values depend on the current linear model and allowable ranges. They are not permanent business truths and should not be extended beyond their valid range.

9 Troubleshoot Solver Models

ProblemLikely CauseCorrective Action
Objective does not changeChanging cells are not linked to the objectiveTrace formulas and manually test decision cells
Unbounded solutionA necessary upper or lower limit is missingAdd realistic capacity, demand or decision bounds
No feasible solutionConstraints conflict or requirements exceed capacityReview each rule, units and minimum requirements
Negative quantitiesNon-negativity was not enforcedAdd decision cells >= 0 or enable non-negative variables
Fractional people or assetsInteger restriction is missingAdd int constraints to indivisible decisions
Different answers from GRGNonlinear local solutions or starting-point dependenceTest several starting values and compare objective results
Very slow solutionExcessive discrete rules or a poorly scaled modelSimplify logic, tighten bounds and improve model structure
Business-rejected resultA real-world rule is absentAdd the missing operational, policy or quality constraint

Practical Experiment 8: Compare Methods and Diagnose Errors

Use three prepared models: linear, smooth nonlinear and logic-heavy.

Step 1: Match

Select the expected solving method for each model and justify the choice.

Step 2: Break

Remove one critical constraint and observe the resulting warning or unrealistic answer.

Step 3: Repair

Restore the rule, solve again and document the change in feasibility and objective.

Learning Output: A troubleshooting record connecting model symptoms with corrective action.
Interactive Method Lab

Choose a Solver Method and Constraint Pattern

Select the model characteristics to receive a practical starting recommendation.

Recommendation: Choose the model characteristics and click the button.
Real-Time Practical Assignment

Production and Workforce Optimization Model

Create a complete decision model for a business producing multiple products with limited machines, labour, materials and staffing capacity.

1
Define the Decision

State whether the objective is maximum contribution, minimum total cost or a balanced service target.

2
Build Assumptions

Enter product contribution, machine time, labour time, material use, demand limits and workforce costs.

3
Create Variables

Add production-quantity cells and, where required, integer staffing or binary activation decisions.

4
Calculate Outputs

Use SUMPRODUCT for contribution, capacity usage, wage cost and demand fulfilment.

5
Configure Solver

Set objective, changing cells, constraints and the correct solving method.

6
Validate and Report

Reconcile constraints, explain binding resources and prepare a management recommendation.

Required Submission: Excel workbook with assumptions, model, Solver configuration, original and optimized plans, Answer Report where available, validation checks, screenshot of parameters and a one-page management summary.
AICPE Quality Learning Commitment: This assignment develops practical decision-modelling skills for operations, MIS, finance, supply chain, administration, freelancing and business consulting. Learn more at aicpeindia.org and aicpe.online.
Practice Worksheet

Complete These Optimization Tasks

Save each model or calculation as evidence for your Advanced Excel portfolio.

1
Optimization Map

Write the decisions, objective, formulas and constraints for a local business problem.

Output: one-page model specification
2
Solver-Ready Workbook

Create separate assumption, decision, calculation, control and output zones.

Output: structured workbook
3
Target Model

Use Solver to determine the activity level required to reach a specified profit.

Output: solved target model
4
Product Mix

Maximize profit for at least three products under two resource limits.

Output: Simplex LP model
5
Distribution Allocation

Minimize shipment cost from multiple sources to multiple destinations.

Output: balanced transport model
6
Workforce Planning

Meet daily staffing demand using full-time and overtime resources at minimum cost.

Output: integer scheduling model
7
Project Selection

Use binary variables to choose projects within budget and policy conditions.

Output: optimized project portfolio
8
Nonlinear Pricing

Optimize price when demand changes with the selected price.

Output: GRG Nonlinear model
9
Sensitivity Interpretation

For a suitable linear model, explain binding constraints, slack and one shadow price.

Output: interpretation note
10
Management Summary

Present recommendation, objective improvement, key limits, risks and implementation conditions.

Output: one-page decision report
Common Mistakes

Mistakes Solver Users Should Avoid

Most unreliable Solver results come from incomplete business logic rather than from the optimization engine itself.

Wrong Practices

  • Changing cells are not connected to the objective.
  • A critical capacity, demand or policy constraint is missing.
  • Simplex LP is selected for a nonlinear model.
  • People, vehicles or projects are allowed to be fractional.
  • Negative decisions are permitted unintentionally.
  • Units or reporting periods are inconsistent.
  • The first nonlinear result is accepted without retesting.
  • An infeasible business recommendation is presented as final.

Professional Practices

  • Test every formula manually before running Solver.
  • Create a written list of all real-world constraints.
  • Select the solving method from model behaviour.
  • Use integer or binary rules only where genuinely required.
  • Add practical upper and lower bounds.
  • Maintain consistent units and source documentation.
  • Retest nonlinear models from multiple starting points.
  • Validate, reconcile and explain the solution before implementation.
Remember: Solver optimizes the model you build—not the real business automatically. A missing rule can turn a mathematically optimal answer into an operationally harmful decision.
Knowledge Check

Quick Quiz: Solver and Optimization

Answer all 12 questions and review the explanations after submitting.

1. What does an Excel optimization model require?

Optimization requires cells Solver may change, a result to improve and rules defining feasible decisions.

2. Which cells should be selected as changing variable cells?

Changing cells should contain the quantities, allocations or selections Solver is permitted to adjust.

3. Which method is normally preferred for a fully linear product-mix model?

Simplex LP is designed for linear objectives and linear constraints.

4. Which formula pattern is nonlinear?

When price also changes demand, the decision variable affects multiple connected terms and creates a nonlinear relationship.

5. What does an integer constraint do?

Integer restrictions are appropriate for indivisible decisions such as staff, vehicles and machines.

6. What values can a binary decision cell contain?

A binary decision uses 0 and 1 to represent alternatives such as reject/select or closed/open.

7. What is a binding constraint?

A binding constraint has no remaining slack at the optimized solution.

8. Why can a model become unbounded?

Without appropriate bounds, Solver may be able to improve the objective indefinitely.

9. Which method is suitable for smooth nonlinear formulas?

GRG Nonlinear is intended for smooth nonlinear relationships, though starting values should be tested.

10. What is slack?

Slack measures the unused amount remaining before a less-than-or-equal constraint reaches its limit.

11. Why should nonlinear models be tested from different starting values?

Different starting values help test whether a nonlinear result is sensitive to its initial position.

12. What should happen before a Solver recommendation is implemented?

A mathematical result becomes useful only after technical and operational validation.
Quick Revision

Remember These Optimization Principles

Review these points before moving to Formula Auditing and Error Management.

Define the Decision

State exactly what Solver may change and what business result should improve.

Build Transparent Formulas

Connect decision cells to objective and constraints using auditable calculations.

Capture Every Constraint

Translate capacity, demand, budget, policy and implementation limits.

Match the Method

Use Simplex LP, GRG Nonlinear or Evolutionary according to formula behaviour.

Use Discrete Rules Carefully

Apply integer and binary constraints where decisions cannot be fractional.

Validate Before Action

Check feasibility, assumptions, reports, sensitivity and practical usability.