MindFusion.Wpf Pack Programmer's Guide
CHOOSE

Returns a value from the specified list of values based on the specified index.

Syntax  Copy Code

CHOOSE( Integer index, Any value1, [Any value2], ... ) Any

Parameters

index
Required. The index of the value to return. Must be greater than zero.
value1
value2
One or more values from which CHOOSE selects based on index.

Remarks

If index is 1, CHOOSE returns value1, if index is 2, CHOOSE returns value2, and so on. The values of parameters other than index and the one chosen are not evaluated for side effects, that is, this function short-circuits.

If index is less than zero or greater than the number of values passed as parameters, CHOOSE returns the #VALUE! error value. If index is not an integer value, it is automatically truncated.

Example

Formula  Copy Code

=SUM(CHOOSE(2,A1:A5,B1:B5,C1:C5))

See Also

Function Reference
IF Function
INDEX Function