=Choose(index_num, value1, value2, . . . )



Choose uses index_num to return a value from a list of values.


If index_num is 1, CHOOSE will return value1, etc.


index_num can be a number, a formula that results in a number, or a reference to a cell.


index_num must refer to a number between 1 and 29, or the maximum number of values.


Up to 29 values can be listed.

Values can be numbers, text, cell references, formulas, functions or defined names


Example:

=CHOOSE(3, North, South, East, West)



The index_num is 3, therefore CHOOSE will return the third value, which is East.



  A B C D E F G
1                                                       
2                                                       
3
4                                                       
5                                                       
6                                                       

The sample above shows a number in the cell B1.


This number represents a day of the week.


We want to convert this number to the name of the day.


The CHOOSE function in cell A3 will return the name from the list of values.


The index_num is B1, which evaluates to the number 3.


The third value in the list is Tuesday.


The result will look like the following sample.


  A B C D E F G
1                                                       
2                                                       
3                                                  
4                                                       
5                                                       
6                                                       


CHOOSE can also use cell references in the values list.

In this example, the names of the regions are in the range of B2:B5.

The value in F2 is the region number we want.


  A B C D E F G
1                                      

2

        
2                                                  
3                                                  
4                                                  
5                                                  
6                                                       

The formula is:

=CHOOSE(F1, B2,B3,B4,B5)



The index_num is D1, which is 2
Therefore CHOOSE will return the second value, which is B3, or West.










Copyright © 2006-2016, LQSystems,Inc. All rights reserved.


   Printer Friendly Page


Home