Forum Discussion
Finding data not on a list
PeterBartholomew1 I liked your idea of finding the results bi-directional (especially since my first answer above completely missed the intended direction) so I did a version without Lambda:
=LET(m,$A$2:$B$50,n,$C$2:$C$50,
s,ROWS(m),t,SEQUENCE(s+ROWS(n)),
u,UNIQUE(IF(t<=s,INDEX(m,t,1)&" "&INDEX(m,t,2),INDEX(n,t-s)),0,1),
CHOOSE({1,2},
LEFT(SUBSTITUTE(u," ",REPT(" ",LEN(u))),LEN(u)),
RIGHT(SUBSTITUTE(u," ",REPT(" ",LEN(u))),LEN(u))))I get the impression that the LAMBDA function was only introduced as early as it was in the transformation of Excel because it leveraged the work already done for LET. The main difference is the reusability of the LAMBDA.
I accept it is a bit premature to introduce it into Q&As though. I have an alternative of using Charles Williams's FastExcel which has VSTACK and HSTACK functions but that makes the solution even more inaccessible. Mind you, Charles has now written a runtime version which I should investigate.
- SergeiBaklanMay 27, 2021Diamond Contributor
Oh, why do we need lambdas here?
- PeterBartholomew1May 27, 2021Silver Contributor
As an answer for the OP, we don't.
For my own use, I would employ the FastExcel function VSTACK, and that was my starting point.
I based the names on Lorenzo picture, though I had moved the range so my cell references would not be the same even if I quoted them.