GoalSeek Method (DefaultSheetDataModel)
In This Topic
Attempts to find a value for one cell that produces the desired formula result in another cell.
Syntax
'Declaration
Public Function GoalSeek( _
ByVal As Integer, _
ByVal variableColumn As Integer, _
ByVal As DefaultSheetDataModel, _
ByVal As Integer, _
ByVal formulaColumn As Integer, _
ByVal As Double _
) As Boolean
'Usage
Dim instance As DefaultSheetDataModel
Dim variableRow As Integer
Dim variableColumn As Integer
Dim formulaDataModel As DefaultSheetDataModel
Dim formulaRow As Integer
Dim formulaColumn As Integer
Dim desiredResult As Double
Dim value As Boolean
value = instance.GoalSeek(variableRow, variableColumn, formulaDataModel, formulaRow, formulaColumn, desiredResult)
Parameters
- variableRow
- Row index of cell that contains value to adjust
- variableColumn
- Column index of cell that contains value to adjust
- formulaDataModel
- Data model of cell that contains formula
- formulaRow
- Row index of cell that contains formula
- formulaColumn
- Column index of cell that contains formula
- desiredResult
- Formula result you wish to achieve
See Also