What is the CHOOSE function?
=CHOOSE(index_num, value1, [value2], ...)CHOOSE returns the value at the position given by a number: 1 returns value1, 2 returns value2.
Use it to turn a weekday number into a day name or a quarter number into a quarter name. An index below 1 or above the number of values gives #VALUE!.
Arguments
- index_num
- Which value to pick. Decimals are dropped.
- value1, value2, ...
- The list of values. Numbers, text, cells and ranges are all allowed.
CHOOSE examples
Example 1. Pick a season
=CHOOSE(2, "Spring", "Summer", "Autumn", "Winter")"Summer".
Example 2. Day name
=CHOOSE(WEEKDAY(A2), "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat")Picks the day name using the number from WEEKDAY.
Example 3. Pick a range
=SUM(CHOOSE(2, A1:A10, B1:B10))As in Microsoft's example, adds the second range, B1:B10.
Common mistakes
Thinking it starts at 0
CHOOSE counts from 1.
An index larger than the number of values
You get #VALUE!.
FAQ
- Pick by a condition?
- Use IF, IFS or SWITCH.
- How many values?
- According to Microsoft, up to 254.