GoalSeek Method (FpSpread)
Attempts to find the value for one cell that produces the desired formula result in another cell.
'Declaration
Public Function GoalSeek( _
ByVal As Integer, _
ByVal As Integer, _
ByVal variableColumn As Integer, _
ByVal As Integer, _
ByVal As Integer, _
ByVal formulaColumn As Integer, _
ByVal As Double _
) As Boolean
'Usage
Dim instance As FpSpread
Dim variableSheet As Integer
Dim variableRow As Integer
Dim variableColumn As Integer
Dim formulaSheet As Integer
Dim formulaRow As Integer
Dim formulaColumn As Integer
Dim desiredResult As Double
Dim value As Boolean
value = instance.GoalSeek(variableSheet, variableRow, variableColumn, formulaSheet, formulaRow, formulaColumn, desiredResult)
Parameters
- variableSheet
- Sheet index of cell that contains value to adjust
- variableRow
- Row index of cell that contains value to adjust
- variableColumn
- Column index of cell that contains value to adjust
- formulaSheet
- Sheet index of cell that contains the formula
- formulaRow
- Row index of cell that contains the formula
- formulaColumn
- Column index of cell that contains the formula
- desiredResult
- Formula result you wish to achieve
Return Value
true if value is found, false otherwise