Equivalent to choosing the Goal Seek command from the Tools menu
[C++]
static int GoalSeek(
const CXlOper& target_cell,
const CXlOper& target_value,
const CXlOper& variable_cell
);
Target_cell corresponds to the Set Cell box in the Goal Seek dialog box and is a reference to the cell containing the formula.
Target_value corresponds to the To Value box in the Goal Seek dialog box and is the value you want the formula in target_cell to return.
Variable_cell corresponds to the By Changing Cell box in the Goal Seek dialog box and is the single cell that you want Microsoft Excel to change so that the formula in target_cell returns target_value.
Zero if the function has been called successfully; non-zero
if the function could not be called.
See Error codes for a list
of return values.
See the Microsoft Excel on-line Help for full details about
this function.
Header: xlfuncs.h