SOLVER.OK macro

Equivalent to clicking the Solver command on the Tools menu and specifying options in the Solver Parameters dialog box. Specifies basic Solver options, except that constraints are added via SOLVER.ADD.

If this function is not available, you must install the Solver add-in.

Syntax

SOLVER.OK(set_cell, max_min_val, value_of, by_changing)

SOLVER.OK?(set_cell, max_min_val, value_of, by_changing)

Set_cell    corresponds to the Set Target Cell box in the Solver Parameters dialog box.

 

Max_min_val    corresponds to the options Max, Min, and Value Of in the Solver Parameters dialog box. Use this option only if you entered a reference for set_cell.

Max_min_val

Option specified

1

Maximize

2

Minimize

3

Match specific value

Value_of    is a number that becomes the target for the cell in the Set Target Cell box if max_min_val is 3. Value_of is ignored if the cell is being maximized or minimized.

By_changing    indicates the changing cells, as entered in the By Changing Cells box. By_changing must refer to a cell or range of cells on the active worksheet, and can be a multiple selection.

Remarks

The constraints in a Solver problem can refer to a maximum of 400 cells.

Related Function

SOLVER.SOLVE   Returns an integer value indicating the condition that caused Solver to stop

Return to index