GoalSeek(Double,String,Boolean) Method
In This Topic
Calculates the values necessary to achieve a specific goal.
Syntax
'Declaration
Overloads Function GoalSeek( _
ByVal As Double, _
ByVal As String, _
Optional ByVal 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)
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 's value is changed only if the goal seek is successful.
Return Value
true
if the goal seek is successful, false
otherwise.
See Also