Forum Discussion
joelb95
Apr 12, 2024Brass Contributor
Weird Results from Array Manipulation - Any ideas on why?
Hi all - doing some exploring with lets and lambda in excel and passing arrays around. I found a weird quirk where something that should work doesn't work as expected in a surprising way. This prob...
SergeiBaklan
Apr 13, 2024Diamond Contributor
Second one
=LET(
many, LAMBDA(choice,
CHOOSE(
choice + 1,
10,
"b",
"harry",
"c",
SEQUENCE(4, 1, 5),
SEQUENCE(3),
45,
"d",
"lots",
"e",
"ten"
)
),
HSTACK(many(1), many(2), many(3), many(4))
)
works as expected. First 3 return single values, many(4) returns 4-rows array. Combining by HSTACK single value and an array doesn't expand single value to the rest of rows, it returns #N/A for the rows which doesn't exist in the specific column.
However, I'm not sure which result do you expect.