Spread Windows Forms 17
GrapeCity.Spreadsheet Assembly / GrapeCity.Spreadsheet Namespace / IRange Interface / GoalSeek Method / GoalSeek(Double,IRange,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,IRange,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 IRange, _
       Optional ByVal changeIfFound As Boolean _
    ) As Boolean
    'Usage
     
    
    Dim instance As IRange
    Dim goal As Double
    Dim changingCell As IRange
    Dim changeIfFound As Boolean
    Dim value As Boolean
     
    value = instance.GoalSeek(goal, changingCell, 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