SOLVER.ADD macro

Equivalent to clicking the Solver command on the Tools menu and clicking the Add button in the Solver Parameters dialog box. Adds a constraint to the current problem. For an explanation of constraints, see "Remarks" later in this topic.

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

Syntax

SOLVER.ADD(cell_ref, relation, formula)

Cell_ref    is a reference to a cell or range of cells on the active sheet and forms the left side of the constraint.

Relation    specifies the arithmetic relationship between the left and right sides, or whether cell_ref must be an integer.

Relation

Arithmetic relationship

1

<=

2

=

3

>=

4

Int (cell_ref is an integer)

Formula    is the right side of the constraint and will often be a single number, but it may be a formula (as text) or a reference to a range of cells.

 

Remarks

 

Related Function

SOLVER.DELETE   Deletes an existing constraint

Return to index