Spread.NET 17 Formula Reference
Formula Functions / Functions A to C / CHOOSE
In This Topic
    In This Topic

    This function returns a value from a list of values.




    This function has these arguments:

    Argument Description
    index Index of the specified values to return; an integer value between 1 and 255
    value1, etc. Values from which to choose; can have up to 255 values; can be numbers, cell references, cell ranges, defined names, formulas, functions, or text

    The value arguments can be range references as well as single values. For example, the formula:


    evaluates to:


    which then returns a value based on the values in the range B1:B10.


    This function is evaluated first, returning the reference B1:B10. The SUM function is then evaluated using B1:B10.

    Data Types

    The index argument accepts numeric data. The value arguments accept any data. Returns the type of data of the specified value.


    CHOOSE(3,A1,B1,C1,D1,E1) gives the result C1

    CHOOSE(3,R1C1,R1C2,R1C3,R1C4,R1C5) gives the result R1C3

    CHOOSE(2,"dogs","birds","fish","cats","mice") gives the result birds

    Version Available

    This function is available in product version 1.0 or later.

    See Also

    INDEX | SUM | Lookup Functions