Forum Discussion
ecovonrein
Jun 30, 2022Iron Contributor
HRECURSE instead of MAKEARRAY, recursing LAMBDA
I wish to share with the community some seriously goofy but generic LAMBDA code I created yesterday. By way of introduction, once you go down the route of SPILLed inputs, you very quickly arrive ...
ecovonrein
Jun 30, 2022Iron Contributor
Word of warning, as I am just rolling this technique into production. I notice some VERY ODD behaviour as I copy something akin to
=VRECURSE(1;5;0;LAMBDA(i;p;p(1)+INDEX(P$100:P$200;i;1)))
across columns of my spreadsheet. The formula will calc (and give the correct result) during normal operation but when I try to edit it (via F2 in column P, and ONLY column P), I cannot ENTER. Excel throws up some "bad formula" error and places the cursor on P$100. It is very odd - some logic of the editor appears to confuse P$100 with the function "p". I can resolve the (editing) issue with
=VRECURSE(1;5;0;LAMBDA(i;Prev;Prev(1)+INDEX(P$100:P$200;i;1)))