Choose Function: Explained with Examples
Choose function helps us to select a particular value from list of values. Or selecting particular cell or range from a range.
For example, we may have some data in a range. And we wants to get a data from based on another selection. This type of functionality can be achieved with CHOOSE formula in Excel.
What is the use of CHOOSE function?
CHOOSE Function in Excel returns a value from a list of values based on a given index position.
What is the syntax of CHOOSE function?
CHOOSE( position, value1,
position: index position number in the list of values to be returned.
value1, [value2], …: List of values to choose.
Note: The number of list item should be between 1 to 29. so you index position will be any number between 1 to 29.
CHOOSE Function in Excel – Examples
Example 1: Choose function returns 1001 as output.
=CHOOSE(1,A4,A5,A6,A7) formula choose the first (1) value from the list (A4,A5,A6,A7) and returns its value 1001 as output.
Example 2: Choose function returns “second” as output.
=CHOOSE(2,”first”,”second”,”third”) formula choose the second (2) value from the list (“first”,”second”,”third”) and returns its value second as output.
Example 3: Choose function returns 1025 as output.
=CHOOSE(4,A4,A5,A6,A7) formula choose the fourth (4) value from the list (A4,A5,A6,A7) and returns its value 1025 as output.
Example 4: Choose function returns 1008 as output.
=CHOOSE(2,A4,A5,A6,A7) formula choose the second (2) value from the list (A4,A5,A6,A7) and returns its value 1008 as output.
VBA example on CHOOSE function
CHOOSE function is also available in VBA, following is the example code:
Dim sOutout As String
sOutout =Choose(2, “First”, “Second”, “Third”)
Output: Second
This choose function(Choose(2, “First”, “Second”, “Third”)) in VBA, chooses the second (2) value from the list (“First”, “Second”, “Third”) and returns “second” as output.
Conclusion:
Choose function is helpful to extract a value from the list of values. Some times helps to alternative to LOOKUP formulas. CHOOSE formula will be used with the cobination of MATCH, INDEX, OFFSET to lookup a value which is not possible with VLOOKUP and HLOOKUP.
Reference:
Please refer the below article for more Lookup & Reference Excel functions.
Lookup & Reference Excel Formulas
Please refer the below article for more Excel Functions.
Excel Formulas | Home
If i have more than 28 data from where i have to choose then i got error message…
so what i have to do?