CHOOSE

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

Returns the value in a row (or column) based on an index number.

index_numThe position you want to return.
value1The first value.
value2(Optional) The second value.

REMARKS
* This function can return multiple values.
* This function can create a Dynamic Array Formula.
* When this function returns multiple values it will create a Dynamic Formula in Excel 2021.
* The "index_num" can be between 1 and 29 that specifies which value to choose.
* If "index_num" = 1 then "value1" is returned.
* If "index_num" = 2 then "value2" is returned, and so on.
* If "index_num" < 1, then #VALUE! is returned.
* If "index_num" > the number of arguments, then #VALUE! is returned.
* If "index_num" is a fraction, it is truncated to the lowest integer before being used.
* If "index_num" is an array, every value is evaluated.
* The "index_num" can be a formula or reference to a cell containing a number between 1 and 29.
* The "value" arguments can be numbers, cell references, named ranges, formulas, functions or text.
* You can have a maximum of 255 arguments.
* You can use the INDEX function when you have more than 255 values.
* You can use the MATCH function to return the position of a value.
* You can use the SUM function to return the total of the numerical values.
* You can use the SWITCH function to return a value based on a list of exact matches.
* The equivalent VBA function is VBA.CHOOSE
* This function has been available since Excel 1997.
* For the Microsoft documentation refer to support.microsoft.com
* For the Google documentation refer to support.google.com

 AB
1=CHOOSE(B1, "Nails", "Screws", "Nuts", "Bolts") = Nuts3
2=CHOOSE(B2, "Nails", "Screws", "Nuts", "Bolts") = Screws2
3=CHOOSE(2.5, "Nails", "Screws", "Nuts", "Bolts") = Screws12
4=CHOOSE(B2, "First", "Second", "Third") = Second 
5=CHOOSE(5, "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun") = Fri 
6=CHOOSE({3,4},"Mon","Tue","Wed", "Thu","Fri","Sat","Sun") = { Wed, Thu } 
7=CHOOSE(2,"1st",named_range, "2nd","3rd","4th") = 12 
8=CHOOSE(-1, "Nails", "Screws", "Nuts", "Bolts") = #VALUE! 
9=CHOOSE(5, "1st", "2nd", "3rd", "4th") = #VALUE! 
10=CHOOSE(2, {1, 2, 3, 4}) = #VALUE! 

1 - What is the 3rd item in the given list.
2 - What is the 2nd item in the given list.
3 - What value is returned when the index number is 2.5.
4 - What is the 2nd item in the given list.
5 - What is the 5th item in the given list.
6 - What are the values 3 and 4 in the given list.
7 - This function can return values from cells with named ranges.
8 - What if the index number is less than one.
9 - What if the index number is greater than the number of arguments.
10 - What if the second argument is a list.

© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited Top