Spread Windows Forms 12.0 Product Documentation
GoalSeek(Double,CellReference,Boolean) Method


GrapeCity.Spreadsheet Assembly > GrapeCity.Spreadsheet Namespace > IRange Interface > GoalSeek Method : GoalSeek(Double,CellReference,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.
Calculates the values necessary to achieve a specific goal.
Syntax
'Declaration
 
Overloads Function GoalSeek( _
   ByVal goal As Double, _
   ByVal changingCell As CellReference, _
   Optional ByVal changeIfFound As Boolean _
) As Boolean
'Usage
 
Dim instance As IRange
Dim goal As Double
Dim changingCell As CellReference
Dim changeIfFound As Boolean
Dim value As Boolean
 
value = instance.GoalSeek(goal, changingCell, changeIfFound)
bool GoalSeek( 
   double goal,
   CellReference 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

Reference

IRange Interface
IRange Members
Overload List