Skip to content

Chapter 6 of 7

What-If, Optimization & Simulation

Excel's What-If tools translate an analyst's question into the structure the engine can solve. Goal Seek sets a single input cell so that a single output cell hits a target value — for example, finding the operating margin that makes NPV equal to zero. Data Tables generalize this to one or two varying inputs. A one-variable Data Table lays the inputs down a column and asks Excel to recompute the output cell for each; a two-variable Data Table varies one input along the top row and another down the left column, producing a full grid of results for visualization. Scenario Manager is similar but higher-level: it saves named sets of input values across multiple cells and lets the analyst switch between cases to compare outcomes — useful for "Base," "Upside," and "Downside" views of the same model. `=CHOOSE(scenario_index, case1, case2, case3)` performs the in-formula equivalent, picking the nth argument when an integer flag changes.

Solver extends the same idea to constrained optimization. Loaded as an add-in under File → Options → Add-ins, Solver adjusts changing cells to maximize, minimize, or set a target on an objective cell, subject to inequality, equality, and integer constraints. For smooth nonlinear models (calibrating a yield curve, fitting Black–Scholes implied vol to a price), GRG Nonlinear is the right engine; for resource-allocation problems with linear constraints (portfolio rebalancing, mix-shift optimization, blend planning), LP Simplex offers exact solutions and a tableau for diagnostics.

When Goal Seek and Solver both fall short, Monte Carlo simulation samples from input distributions and re-runs the model many times to build an empirical distribution of outcomes. A column of `=NORM.INV(RAND(), mean, stdev)` next to one output cell, iterated across N rows via a Data Table, is the lightest-weight version that doesn't require VBA — Excel repopulates `RAND()` per iteration. For valuation work, the most common sensitivity chart pairs discount rate with NPV: a column of WACC values from 7% to 12% alongside `=NPV(A2, FCFs) + InitialOutflow`, plotted as a line. The chart's slope reveals how brittle the value is to the cost-of-capital assumption. Across all of these tools, manual calculation mode (toggled under Formulas → Calculation Options → Manual) keeps large sensitivity grids from triggering thousands of unwanted recalculations; pressing F9 just before producing a deliverable refreshes the final values.

All chapters
  1. 1Time Value of Money
  2. 2Bonds, Yield & Cost of Capital
  3. 3Valuation & DCF Mechanics
  4. 4Financial Statement Modeling & Ratios
  5. 5Lookups, References & Dynamic Arrays
  6. 6What-If, Optimization & Simulation
  7. 7Data Shaping, Dates, Pivots & DAX

Drill it

Reading is not remembering. These come from the Excel Formulas For Financial Analysts deck:

Q

NPV formula in Excel?

=NPV(rate, value1, value2, ...) + initial_investment — NPV discounts from period 1; include the initial outflow (often negative) separately.

Q

IRR formula?

=IRR(cashflows) — first cashflow usually negative (investment), then inflows.

Q

XNPV vs NPV?

NPV: assumes equal-period intervals.XNPV(rate, values, dates): handles irregular dates.

Q

XIRR vs IRR?

IRR: equal periods.XIRR(values, dates): irregular dates — used when actual cash flow timing varies.