Related Topics:

Function Wizard Functions

CHOOSE

Description: Chooses a value or action to perform from a list of values, based on an index number. For example, if Value1 through Value7 are the days of the week, CHOOSE returns one of the days when a number between 1 and 7 is used as Index_num.

Syntax: CHOOSE(Index_num, Value1, Value2, ...)

If Index_num is 1, CHOOSE returns Value1; if it is 2, CHOOSE returns Value2; and so on.

If Index_num is a fraction, it is truncated to the lowest integer before being used.

Remarks:

SUM(CHOOSE(2,A1:A10,B1:B10,C1:C10))

evaluates to:

SUM(B1:B10)

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

The CHOOSE function is evaluated first, returning the reference B1:B10. The SUM function is then evaluated using B1:B10, the result of the CHOOSE function, as its argument.

Example:

CHOOSE(A10, "Nails", "Screws", "Nuts", "Bolts") = "Bolts"

CHOOSE(2, SalesNew, SalesOld, SalesBudget) = 10,000

 

© 1992-2015. ReliaSoft Corporation. ALL RIGHTS RESERVED.