CellRef: The cell reference works as criteria to solve the equation by changing the value.Ģ. This is VBA SolverAdd function which has the following arguments:ġ. B圜hange: Cells which needs to be changed to solve the equation.ValueOf: Should be used when MaxMinVal has value 3.MaxMinVal: This is an optional parameter, below are numbers and specifiers.SetCell: Reference of the cell which needs to be changed.This is the VBA SolverOK function with parameters: We need to use three of these to solve any of the equations in VBA. VBA Solver has three functions namely SolverOK, SolverAdd, and SolverSolver. Step 4: Navigate towards the Solver reference and tick select it. Step 3: As soon as you click on References… under Tools, a list of VBA references will pop-up. Navigate towards Tools and click on References. Step 2: Inside Visual Basic Editor that opens up after you hit Alt + F11 or click on Visual Basic button under the Developer tab. Step 1: Open a new VBA pane through the Excel Worksheet by either hitting keyboard shortcut Alt + F11 or by navigating to Visual Basics under the Developers tab (You need to enable this option if can’t see in your Excel worksheet) through excel ribbon. Now, we will see how to enable Solver under VBA. For this, follow the below steps: This is the first step that you need to enable solver so that you can use it under VBA.