In reply to Ian Wakeling.

Your approach is a good one. Because the arguments of the CHOOSE function are so simple, CHOOSE is an efficient tool for this application.