CHOOSE

Description

CHOOSE returns a value from a list of numbers based on the index number supplied.

Syntax

CHOOSE (index, item_list )

 

Parameter

Description

index

A number that refers to an item in item_list.

item_list

A list of numbers, formulas, or text separated by the corresponding list separator. This argument can also be a range reference. You can specify as many as 29 items in the list.

Remarks

index can be a cell reference; index can also be a formula returning any value from 1 to 29. If index is less than 1 or greater than the number of items in item_list, #VALUE! is returned. If index is a fractional number, it is truncated to an integer.

Examples

This function returns Q2:

CHOOSE(2, "Q1", "Q2", "Q3", "Q4")

This function returns the average of the contents of range A1:A10:

AVERAGE(CHOOSE(1, A1:A10, B1:B10, C1:C10))

 Note:

If an Invalid formula syntax warning appears, check whether the comma is set as the list separator in your regional settings on the Windows Control Panel. If a different character is set as the list separator, use this character in the above examples in place of the comma. (Windows XP: Access the Windows Control Panel and select Regional and Language Options. On the Regional Options tab page, click Customize. On the Numbers tab page, check which character is the default list separator on your computer. Use this character in the above examples instead of the comma.

Also, see

INDEX