What is the CHOOSE function? Syntax of CHOOSE function in Excel
The CHOOSE function is used to search for a value in a range of values in a table using the syntax “=CHOOSE(index_num, value1, value2…)”.
Where:
- index_num: The position of the returned data.
- Value1: The first value being returned.
- Value2: The second value being returned.
Note:
- “Index_num limit” is in the range from 1 to 2.
- “Index_num must be an integer” or the result of a formula, but it must be an integer value.
- If the value of index_num is not an integer, the function returns “#Value! error value”.
How to use the CHOOSE function in Excel
Using the CHOOSE function to search for words
Example: Use the CHOOSE function to retrieve the value of text in the following table.
Step 1: In the Excel calculation data table, enter the formula “=CHOOSE(1, B5, C5)” in the reference cell where you want to display the result.
Function notation:
- CHOOSE: Command function.
- 1: The position of the first data returned.
- B5: The first value being returned.
- C5: The second value being returned.
Step 2: Finally, press the Enter key.
Using the CHOOSE function to search for numbers
Example: Use the CHOOSE function to retrieve the numerical value in the following table.
Step 1: In the Excel calculation data table, enter the formula “=CHOOSE(2, B5, C5)” in the reference cell where you want to display the result.
Function notation:
- CHOOSE: Command function.
- 1: The position of the first data returned.
- B5: The first value being returned.
- C5: The second value being returned.
Step 2: Press the “Enter” key to display the result.
Combining the CHOOSE function with the WEEKDAY function
You can combine the CHOOSE function with the WEEKDAY function to determine the day of the week starting from that date.
Example: Based on the date to find the days of the week.
In the Excel calculation data table, you “enter the formula =CHOOSE(WEEKDAY(A2), “Sunday”, “Monday”, “Tuesday”, “Wednesday”, “Thursday”, “Friday”, “Saturday”) “.
Function modifiers:
- A2 is the position of the cell containing the date.
- The WEEKDAY function returns the week in the year of a date in the past.
Combining the CHOOSE function and the SUM function
You can combine the CHOOSE function with the SUM function to calculate the sum of values.
Example: Use the CHOOSE function in combination with the SUM function to calculate the sum of values in the following table.
Step 1: In the Excel calculation data table, enter the formula “=SUM(CHOOSE(1, E4: E9, D4: D9))” in the reference cell where you want to display the result.
Function notation:
- SUM, CHOOSE: These are command functions.
- 1: The position of the first data returned.
- E4: E9: The range of the first values returned.
- D4: D9: The range of the second values returned.
Step 2: Press the “Enter” key.
Some notes when using the CHOOSE function
When using the CHOOSE function, you also need to note some of the following points:
- If index_num equals 1, then the CHOOSE function returns value1, if index_num equals 2, then CHOOSE returns value2, similarly, if index_num equals 3, then the CHOOSE function returns value3….
- If index_num is less than 1 or greater than the last value in the list, the CHOOSE function returns the #VALUE! error value.
- If index_num is a fraction, it will be truncated to the lowest integer before being used.
- The arguments for the value of the CHOOSE function can be numbers, cell references, specific names, formulas, functions, or text. The value of value1 is required, while other values are optional.
Conclusion
Above is a detailed guide on how to use the CHOOSE function in Excel with easy-to-understand illustrated images. I hope this article has helped you understand how to use the CHOOSE function in Excel easily and effectively. If you have any suggestions, please leave a comment below and don’t forget to share if you find it useful.
How to recover unsaved or overwritten Excel files effectively: a sure-fire method
Knowing how to recover unsaved Excel files can be extremely helpful in cases when your computer unexpectedly shuts down or you accidentally click on “Don’t save” when Excel asks if you want to save your changes before closing. Follow this article to learn the step-by-step process of how to accomplish it.