GoalSeek

Function

GoalSeek(function, result)

function
result

GoalSeek(function, result, initialGuess)

function
result
initialGuess

GoalSeek(resultFunction, result, getFunction, setFunction)

resultFunction
result
getFunction
setFunction

GoalSeek(resultFunction, result, node)

resultFunction
result
node

Using the GoalSeek function

The Blockpad GoalSeek function lets you find iterative solutions without writing special macros. It can be used:

  • Within a formula, where the goal-seek occurs automatically within a file, or
  • As a special step to run manually, like a macro.

 

GoalSeek within formulas

To use the GoalSeek function within formulas, input a function and the desired result. The function solves with the built-in iterative solver.

You may include an initial guess as well. An initial guess can affect the result for non-linear functions (for example, it can avoid unwanted results of 0), and it is important for variables with units.

Example usage:

Note that although the function in the above example was named f, it could have been given any name.

You can also use GoalSeek with an inline function. This example also demonstrates GoalSeek with units:

GoalSeek as a manual step

You can run GoalSeek like a macro too. This example uses GoalSeek in the console to get cell C6 to equal a given value by adjusting cell C5. You could store functions in a script frame to re-use like macros as well.

Further improvements to goal seek, including an easier user iterface, are planned in the future.

 

 


Inputs for the GoalSeek function:

function
result

or

function
result
initialGuess

or

resultFunction
result
getFunction
setFunction

or

resultFunction
result
node

 

You can refer to this function in any formula, macro, module, or other script in Blockpad. You can use either its name or its full path:

  • To refer to it by name, use GoalSeek( ... )
  • To refer to it by its full path, use Library.Math.GoalSeek( ... )

 

See also:


GoalSeek is included by default in each file as part of the Math library.

 

See also: