Spread WPF 18
GrapeCity.Spreadsheet Namespace / IRange Interface / GoalSeek Method / GoalSeek(Double,String,Boolean) Method
The value you want returned in this cell.
Specifies which cell should be changed to achieve the target value.
if set to true, the changingCell's value is changed only if the goal seek is successful.


In This Topic
    GoalSeek(Double,String,Boolean) Method
    In This Topic
    Calculates the values necessary to achieve a specific goal.
    Syntax
    'Declaration
     
    Overloads Function GoalSeek( _
       ByVal goal As Double, _
       ByVal changingCell As String, _
       Optional ByVal changeIfFound As Boolean _
    ) As Boolean
    'Usage
     
    Dim instance As IRange
    Dim goal As Double
    Dim changingCell As String
    Dim changeIfFound As Boolean
    Dim value As Boolean
     
    value = instance.GoalSeek(goal, changingCell, changeIfFound)
    bool GoalSeek( 
       double goal,
       string changingCell,
       bool changeIfFound
    )

    Parameters

    goal
    The value you want returned in this cell.
    changingCell
    Specifies which cell should be changed to achieve the target value.
    changeIfFound
    if set to true, the changingCell's value is changed only if the goal seek is successful.

    Return Value

    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.
    See Also