How to Utilize Solver for Optimization in Excel (6 Methods)

Solver acts as a specialized tool that you can incorporate into programs like Excel, functioning as an add-in. Its primary purpose is to solve intricate problems by employing mathematical methods to find the best solution. Solver is particularly adept at resolving linear programming problems, which involve maximizing or minimizing a value while adhering to certain constraints. This capability has led some individuals to refer to it as a linear programming solver. However, its utility extends beyond linear problems; it can also address other types of challenges involving curves and complex scenarios. Thus, whether your problem is straightforward or intricate, Excel Solver is equipped to lend assistance.

Enabling Solver in Excel

Excel options dialog box

enabling solver add-in in excel

Method 1 – Utilizing Solver for Optimization Without Constraints

In this method, we aim to minimize the value of ()=3+32−5 f ( x ) = x 3 + 3 x 2 − 5 without any constraints.

=C4^3+3*C4^2-5

writing formula of a function of x

clicking on solver from analyze group on Data tab

optimization of a function in excel

Note: We selected the solving method as GRG Nonlinear as it’s a non-linear equation.

The value of x in cell C4 is converted to 0 and the minimum value of f(x) is achieved.

minimization of function of x

Method 2 – Optimization Under Constraints with Solver in Excel

Here, we introduce constraints to the optimization process using Solver.

To explain this method, we have 2300 cm 2 of metal sheet in our hand. From this, we have to make a cylinder with a Height double its Radius. We have to optimize the system so that the Volume gets maximized.

available resources and constraints of a cylinder to be made

=PI()*C5^2*C4

formula to calculate volume of a cylinder

=2*PI()*C5*(C4+C5)

formula to determine the total surface area of a cylinder in excel

In the Solver Parameters dialog box:

set objective to maximize by optimization in excel