Without reference to the original problem (which, I suspect, has long been resolved), I recently discovered a tricky trick that makes the selection function work just like the select case without the need to modify the data. There is only one catch: only one of the conditions you have chosen can be true at a time.
The syntax is as follows:
CHOOSE( (1 * (CONDITION_1)) + (2 * (CONDITION_2)) + ... + (N * (CONDITION_N)), RESULT_1, RESULT_2, ... , RESULT_N )
Assuming that only one of the conditions from 1 to N is satisfied, everything else is 0, which means that the numerical value will correspond to the corresponding result.
If you are not 100% sure that all conditions are mutually exclusive, you may prefer something like:
CHOOSE( (1 * TEST1) + (2 * TEST2) + (4 * TEST3) + (8 * TEST4) ... (2^N * TESTN) OUT1, OUT2, , OUT3, , , , OUT4 , , <LOTS OF COMMAS> , OUT5 )
However, if Excel has an upper limit on the number of arguments a function can take, you will reach it pretty quickly.
Honestly, I canβt believe that it took me years to figure this out, but I havenβt seen it before, so I decided that I would leave it here to help others.
EDIT: According to the comment below from @aTrusty: stupid numbers of commas can be excluded (and as a result, the select statement will work up to 254 cases) using the formula of the following form:
CHOOSE( 1 + LOG(1 + (2*TEST1) + (4*TEST2) + (8*TEST3) + (16*TEST4),2), OTHERWISE, RESULT1, RESULT2, RESULT3, RESULT4 )
Notice the second argument in the LOG clause, which puts it in base 2 and makes it all work.
Edit: according to David's answer , there is now an actual expression about switching if you are fortunate enough to work in the office 2016. In addition to reading difficulties, this also means that you get switching efficiency, not just behavior!