SpreadsheetGear Namespace > IRange Interface : GoalSeek Method |
'Declaration
Function GoalSeek( _ ByVal goal As System.Double, _ ByVal changingCell As IRange _ ) As System.Boolean
'Usage
Dim instance As IRange Dim goal As System.Double Dim changingCell As IRange Dim value As System.Boolean value = instance.GoalSeek(goal, changingCell)
System.bool GoalSeek( System.double goal, IRange changingCell )
function GoalSeek( goal: System.Double; changingCell: IRange ): System.Boolean;
function GoalSeek( goal : System.double, changingCell : IRange ) : System.boolean;
System.bool GoalSeek( System.double goal, IRange* changingCell )
System.bool GoalSeek( System.double goal, IRange^ changingCell )
This GoalSeek method uses a simple iterative linear search for a value which, when placed in the cell specified by changingCell, yields a calculated result very close to the specified goal from the formula in the cell represented by this IRange.
The cell represented by this IRange should contain a formula which is directly or indirectly dependant on the cell specified by changingCell.
The cell specified by changingCell will contain the value used to achieve the desired goal if this method is successful.
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2