3.5.10.5 Iferror
Contents
Description
Minimum Origin Version Required: 2026b
Evaluate the given expression and return the specified err (can be string or numeric) if the expression produces an error or missing value, otherwise return the result of the expression.
Note:
- Refer to this page for error types supported in Origin.
- This function is available for Set Column Values only.
Syntax
string/double Iferror(string expression, string/double err)
double iferror(double val, string/double err)
Parameters
expression
- The formula expression or value to evaluate. If the result is an error or missing value, err will be returned. Refer to this page for error types supported in Origin.
err
- String or numeric value to return when the expression evaluates to be an error or missing.
Return
Return the specified err if the result of the given expression produces an error or missing, otherwise return the value of expression.
Example
Example 1
iferror(A/B, "invalid")
In the F(x) header row. fill column C with value from col(A)/col(B). If the result is missing or error, fill that row with "invalid"
/Iferror_example1.webp?v=XBGh8tMkxss)