Learn Excel - Simplify Life with Excel Concepts

Excel CHOOSE Function

CHOOSE Function

How to use the CHOOSE Function (WS, VBA)

This Excel tutorial explains how to use the Excel CHOOSE function with syntax and examples.

SUMMARY:

The Excel CHOOSE function returns a value from a list of values based on a given position.
Uses index_num to return a value from the list of value arguments. Use CHOOSE to select one of up to 254 values based on the index number.

For example,

  • CHOOSE(2,"red","blue","green") returns "blue", since blue is the 2nd value listed after the index number. The values provided to CHOOSE can include references.
  • 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.

PURPOSE:

Get a value from a list based on position

RETURN VALUE:

The value at the given position.

  • The CHOOSE function returns any datatype such as a string, numeric, date, etc.
  • If position is less than 1, the CHOOSE function will return #VALUE!.
  • If position is greater than the number of the number of values in the list, the CHOOSE function will return #VALUE!.

SYNTAX:

=CHOOSE(index_num, value1, [value2], ...)

ARGUMENTS:

The CHOOSE function syntax has the following arguments:

  • Index_num: Required. Specifies which value argument is selected. Index_num must be a number between 1 and 254, or a formula or reference to a cell containing a number between 1 and 254
    • If index_num is 1, CHOOSE returns value1; if it is 2, CHOOSE returns value2; and so on.
    • If index_num is less than 1 or greater than the number of the last value in the list, CHOOSE returns the #VALUE! error value.
    • If index_num is a fraction, it is truncated to the lowest integer before being used.
  • Value1, value2, ... : Value 1 is required, subsequent values are optional. 1 to 254 value arguments from which CHOOSE selects a value or an action to perform based on index_num. The arguments can be numbers, cell references, defined names, formulas, functions, or text.

REMARKS:

  • If index_num is an array, every value is evaluated when CHOOSE is evaluated.
  • The value arguments to CHOOSE can be range references as well as single values.
  • If position is a fraction (not an integer value), it will be converted to an integer by dropping the fractional component of the number.

Useful Links: Link 1Link 2Link 3Link 4