Version

UltraCalcFunctionIf Class

Chooses between two outcomes (or UltraCalc expressions to evaluate) based on the result of a logical test on a value or UltraCalc expression you specify.
Syntax
'Declaration
 
Public Class UltraCalcFunctionIf 
   Inherits BuiltInFunctionBase
public class UltraCalcFunctionIf : BuiltInFunctionBase 
Remarks

IF( boolean_test, result_if_true, [result_if_false])

Boolean_test is a value (or an UltraCalc expression) which the IF function evaluates to produce a boolean value of either TRUE or FALSE. The outcome of this test determines which result will be returned by the function.

Result_if_true is a value (or the outcome of another UltraCalc expression) that will be returned only when boolean_test has evaluated to the boolean value, TRUE.

Result_if_false is a value (or the outcome of another UltraCalc expression) that will be returned only when boolean_test has evaluated to the boolean value, FALSE.

The IF function allows you to write an UltraCalc expression that branches to one expression (when the boolean_test is TRUE) or another (when the boolean_test is FALSE) based on an arbitrary condition you have specified.

The result_if_false is not specified and boolean_test is FALSE, the IF function will return FALSE.

If boolean_test's evaluation produces an error value then neither Result_if_true nor Result_if_false will be evaluated. Instead, the IF function returns the error value from its evaluation of boolean_test.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also