Skip to content
Agent Tools

goalSeek

Find the input value needed to achieve a target result (like Excel’s Goal Seek). Iteratively adjusts the control cell until the target cell reaches the desired value.

ParameterTypeDescription
writeobject[]requiredValues to write before goal seeking
write[].cellstringrequiredCell reference
write[].valuestring | number | boolean | nullrequiredValue to write before running goal seek
goalSeekobjectrequiredGoal seek parameters
goalSeek.targetCellstringrequiredCell containing the formula to reach target value
goalSeek.targetValuenumberrequiredDesired value for the target cell
goalSeek.controlCellstringrequiredCell to adjust to achieve the target
persistbooleanoptionalWhether to persist the solved control cell (and any pre-seek writes) to the workbook. Defaults to false: a pure calculation that reports the solution without changing the model.