MindFusion.Wpf Pack Programmer's Guide
IF

Returns one of two specified values if the specified condition evaluates to TRUE, and the other value if the condition evaluates to FALSE.

Syntax  Copy Code

IF( Logical condition, [Any ifTrue], [Any ifFalse] ) Any

Parameters

condition
Required. A value or expression that can be evaluated to TRUE or FALSE. For example, A1=50.
ifTrue
Optional. The value that should be returned if condition evaluates to TRUE.
ifFalse
Optional. The value that should be returned if condition evaluates to FALSE.

Remarks

If condition is TRUE, the function returns ifTrue, else it returns ifFalse. If there is only 1 parameter, ifTrue is considered to be TRUE. If there are less than 3 parameters, ifFalse is considered to be FALSE. Thus the 1 parameter version converts condition into a Logical value. If there are 2 or 3 parameters, but the second parameter is omitted (two consecutive commas), ifFalse is considered to be 0. If there are 3 parameters, but the third parameter is omitted, ifFalse is considered to be 0. This function only evaluates ifTrue, or ifFalse, and never both; that is to say, it short-circuits.

Example

Formula  Copy Code

=IF(A1>B1,"Too many","OK")

See Also

Function Reference
AND Function
OR Function