Recently I mentioned the choose() statement.
The syntax is =choose(IndexNumber,option1, option2, option3, … , optionLast) Open Office and Google Docs can have up to 30 options, and Excel 2010 can have up to 254. You’re not required to have the maximum number of options, of course! You could in theory have just =choose(IndexNumber,option1), though there wouldn’t be much point.
It can only pick based on numbers, not letters, or words, or which of a set of cells is greatest, or anything like that. However, as I demonstrated in the earlier post, there are a lot of ways to convert other things to numbers.
If your IndexNumber is higher than the number of options you’ve given — say, for example, if you had =choose(3,option1,option2) — then you’ll get an error message. In Google Docs and Microsoft Excel the error is #VALUE!, and in Open Office Calc it’s Err:502.
As with IF(), CHOOSE() also has help wizards in Excel and Open Office, but not in Google Docs.