Select Case

(Alfredo Pou) #1

An expression that avoids having a large number of nested IFs would be very useful when making decisions based on different values ​​of a column. Similar to SWITCH (), but that allows to include an expression as a result.
In Visual Basic there was the Select Case function that allowed this to be done.

(Steve Coile) #2
(Alfredo Pou) #3

Ohh my God! 2 years ago I use appsheet and I feel like I do not know anything! Thanks

1 Like
(Levent Kulacoglu) #4

Just a side note here; IFS is working a bit different than SELECT CASE in VB/VBA. In VB/VBA provided you don’t explicitly define a break/exit command after a case construct, the function executes till the end of the function and if it finds another matching case, the function always returns/executes the LAST CASE option found. However, IFS expression in AppSheet, automatically breaks/exits the function on the FIRST MATCH, therefore IFS expressions shall be constructed very wisely.