ToolsCalculate, ToolsCalculate()

Syntax

ToolsCalculate

ToolsCalculate([Expression$])

Remarks

The ToolsCalculate statement evaluates the selection as a mathematical expression, and then displays the result in the status bar. The result is also placed on the Clipboard.

If Expression$ is not specified, the ToolsCalculate() function acts just like the statement except that it returns the result instead of displaying it in the status bar and placing it on the Clipboard. If you do specify Expression$, it is evaluated as a mathematical expression; Expression$ can include bookmark names and simple cell references (such as a5).

Example

In this example, the ToolsCalculate() function adds values from two table cells and returns the result in the variable total. The insertion point must be within the table containing the values.


total = ToolsCalculate("a5 + b5")

See Also

TableAutoSum, TableFormula