Forum Discussion
ecovonrein
Oct 19, 2024Iron Contributor
SWITCH and IFS - a word to the wise
Last night my Excel very nearly died executing something that looked perfectly reasonable: myLambda = LAMBDA(i, SWITCH(i, 1, ..., 15, LET( ..., l, myLambda(1), ...)) There is a recursion but i...
HansVogelaar
Oct 19, 2024MVP
It's sad. See for example Excel IFS, SWITCH, and XLOOKUP evaluate all their arguments
- ecovonreinOct 19, 2024Iron Contributor
HansVogelaarWould upLike your post but that doesn't seem to work today. Your link is a better write-up than mine 🙂 It is outrageous, really, because if Microsoft wanted to be lazy, they would only need to teach the precompiler to translate SWITCH and IFS into IFs in the first pass (a doddle for the precompiler which does not mind counting brackets) and then get the expected functionality for free in the second.