[]
        
(Showing Draft Content)

GrapeCity.Spreadsheet.IRange.GoalSeek

GoalSeek Method

GoalSeek(double, IRange, bool)

Calculates the values necessary to achieve a specific goal.

Declaration
bool GoalSeek(double goal, IRange changingCell, bool changeIfFound = false)
Function GoalSeek(goal As Double, changingCell As IRange, Optional changeIfFound As Boolean = False) As Boolean
Parameters
Type Name Description
double goal

The value you want returned in this cell.

IRange changingCell

Specifies which cell should be changed to achieve the target value.

bool changeIfFound

if set to true, the changingCell's value is changed only if the goal seek is successful.

Returns
Type Description
bool

true if the goal seek is successful, false otherwise.

Remarks

If the goal is an amount returned by a formula, this calculates a value that, when supplied to your formula, causes the formula to return the number you want.

GoalSeek(double, string, bool)

Calculates the values necessary to achieve a specific goal.

Declaration
bool GoalSeek(double goal, string changingCell, bool changeIfFound = false)
Function GoalSeek(goal As Double, changingCell As String, Optional changeIfFound As Boolean = False) As Boolean
Parameters
Type Name Description
double goal

The value you want returned in this cell.

string changingCell

Specifies which cell should be changed to achieve the target value.

bool changeIfFound

if set to true, the changingCell's value is changed only if the goal seek is successful.

Returns
Type Description
bool

true if the goal seek is successful, false otherwise.

Remarks

If the goal is an amount returned by a formula, this calculates a value that, when supplied to your formula, causes the formula to return the number you want.

GoalSeek(double, CellReference, bool)

Calculates the values necessary to achieve a specific goal.

Declaration
bool GoalSeek(double goal, CellReference changingCell, bool changeIfFound = false)
Function GoalSeek(goal As Double, changingCell As CellReference, Optional changeIfFound As Boolean = False) As Boolean
Parameters
Type Name Description
double goal

The value you want returned in this cell.

CellReference changingCell

Specifies which cell should be changed to achieve the target value.

bool changeIfFound

if set to true, the changingCell's value is changed only if the goal seek is successful.

Returns
Type Description
bool

true if the goal seek is successful, false otherwise.

Remarks

If the goal is an amount returned by a formula, this calculates a value that, when supplied to your formula, causes the formula to return the number you want.