Choose Function
- 01:38
Understand how to return a value easily from a list when number of values is fixed
Downloads
No associated resources to download.
Glossary
Array Index Number ScenarioTranscript
The choose function returns a value from a list. So looking at the formula here, it firstly asks us what is that index number? That's which of the values do you want me to choose? So we could have the index number as two. That would be the second from the list. The next question is where is your list? Your list can be value one, value two, and you can then keep putting optional values in. Value three, value four, value five. So if we had index number two from values one, two, three, four, five, it would choose that within value two. In addition to this, instead of having values, you could have cell references. So you could have index number two from A1, A2, A3, A4, and it will return the value given in cell A2. To go even further, instead of having values or cell references, you can have an array of cells. So value one here could actually be A1 to A3. Value two could be A4 to A6. The big advantage of the choose function is it is relatively simple. Most people can pick it up quickly. The downside is that it's inflexible. It has to be rewritten if your model changes. If we look at the screenshot here we're choosing from a list of three cells given in C7, C8, and C9. If I wanted to add in a fourth scenario in C10 I'd have to put that into C10 but then I'd have to go and change my formula. I'd have to add C10 in as an extra value. So a relatively simple formula, but inflexible to changes.