Skip to main content

Solver for Excel

Overview​

The Solver Add-in brings powerful SciPy optimization algorithms directly to Excel as custom functions.

AppSource

Features​

FeatureDescription
πŸ†“ FreeUnlimited free use
🌐 Cross-PlatformWorks in Excel for web and desktop
βœ… Flexible RuntimeUse Excel =PY() or local Python runtime
πŸ”’ PrivateNo data is shared outside Excel
πŸ” TransparentPython source code available for review

How It Works​

Use functions directly in Excel cells (e.g., =SOLVER.MINIMIZE(...)) like native functions. All custom functions use the SOLVER. prefix.

Two ways to use functions:

MethodDescription
Type directlyEnter formulas like =SOLVER.MINIMIZE("x^2 + y^2", {1, 1})
Function DialogGuided experience from the taskpane

Custom functions use Pyodide in Excel's add-in browserβ€”no Python installation needed.

warning

Key Concept​

All functions use mathematical expressions (e.g., x^2 + y^2), to define the objective function.

User Guide​

Getting Started​

Open the Solver taskpane via the Solver ribbon button. Sign in with your current Excel Microsoft account. Grant permissions on first use. Revoke consent via work accounts or personal accounts.

You can now use the Solver functions in your Excel workbook by typing =SOLVER. and selecting a function from the dropdown. You can also use the Solver taskpane to select a function and enter arguments following a three-step workflow:

  1. Select Function β€” Search or browse by category
  2. Enter Arguments β€” Fill parameters with live previews
  3. Insert β€” Choose formula, static result, or =PY() formula

Select Function​

::: Function Search

Search by name/keyword or browse by category.

Function Selected

Select a function to see details, then click Next. :::

Enter Arguments​

MethodDescription
Type directlyText, numbers, or arrays (e.g., {1,2;3,4})
Select rangeClick field, then select cells
Use Test ValuesPopulate with defaults

::: Range Selection

Click field and select cells.

Test Values

Test values include sample arrays. :::

Insert Options​

OptionDescription
Formula (default)Dynamic formula, e.g. =SOLVER.MINIMIZE(...)
ResultStatic computed value that will not update
=PY() formulaExcel's Python environment (selected functions only)

Errors​

ErrorCauseSolution
#VALUE!Wrong type or missing argumentCheck argument types
#NAME?Unrecognized functionCheck spelling and SOLVER. prefix
#BUSY!Processing (normal on first use)Wait; if persistent, click Reset

Functions​

14 optimization functions in five categories. Click for full documentation.

Assignment Problems​

FunctionDescription
LINEAR_ASSIGNMENTSolve linear assignment problem
QUADRATIC_ASSIGNMENTSolve quadratic assignment problem

Global Optimization​

FunctionDescription
BASIN_HOPPINGBasin-hopping algorithm
BRUTEBrute-force grid search
DIFFERENTIAL_EVOLUTIONDifferential evolution
DUAL_ANNEALINGDual annealing
SHGOSimplicial Homology Global Optimization

Linear Programming​

FunctionDescription
LINEAR_PROGLinear programming
MILPMixed-integer linear program

Local Optimization​

FunctionDescription
MINIMIZEMultivariate minimization
MINIMIZE_SCALARSingle-variable minimization

Root Finding​

FunctionDescription
FIXED_POINTFind fixed point f(x) = x
ROOTSolve nonlinear system
ROOT_SCALARFind scalar root

Excel Resources​

ToolBest ForLimitations
This Add-inLarge/advanced problems, programmatic controlMath expressions only
Excel SolverSmall formula-based models (≀200 vars)Limited algorithms, slower
Goal SeekSingle-variable target seekingOne variable only
Analysis ToolPakBasic linear regressionNo nonlinear fitting