Forum Discussion
tboulden
Feb 13, 2021Iron Contributor
Recursive Lambda: Unpacking LET function
RecentlyTwifoo posted the FIFO Inventory challenge, and PeterBartholomew1 ventured "shouldn't take lori_m more than a few minutes to write a recursive Python script to reduce any LET function back to...
rachel
Apr 06, 2024Iron Contributor
TTodorov
Apr 06, 2024Copper Contributor
rachelSeems that in my Excel (version 2308, build 16731.20600), TEXTSPLIT with ARRAYTOTEXT not working. I tried to recreate your data (with "|") and the result seems like this:
At general, result is correct, but not possible to split it.
- rachelApr 06, 2024Iron Contributor
INDEX understands what "string" means.
Below should work for two columns. (I put your data in range A1:B4).
(Also, I guess your "for all" issue might have something to do with space).
=ARRAYTOTEXT( MAP( SEQUENCE(ROWS(A1:A4), 1, 1, 1), LAMBDA(row_index, LET( data, A1:B4, xs, TEXTSPLIT(INDEX(data, row_index, 1), ","), ys, TEXTSPLIT(INDEX(data, row_index, 2), ","), ARRAYTOTEXT(xs & "-" & TRANSPOSE(ys)) ) ) ) )- TTodorovApr 06, 2024Copper Contributor
rachelARRAYTOTEXT produce array which seems to not possible to split it to list (as I need):
Seems that TEXTSPLIT as your first suggestion from an array is not possible for me.
- rachelApr 06, 2024Iron ContributorAre you sure you use semi-colon instead of comma when you TEXTSPLIT?
=TEXTSPLIT(data, ";")?