Forum Discussion
LAMDA to find last instance of a search string within another string
- Aug 01, 2021
Oh Wow !!! Thanks - I was struggling with this problem for quite some time and your solution is going to take most part of today for me to figure out.
Also a great way of showing now the new Lambda helper functions (SCAN in this case) leads to a more elegant solution
Thanks once again for your effort.
Cheers
Sam
Sameer_Bhide It occurred to me later that the new ISOMITTED function could make this inner-loop structure unnecessary; had used it so that outer function only needed two parameters and the inner function's array argument wasn't needed to be a blank parameter.
- Sameer_BhideSep 28, 2021Iron Contributor
I also realized that the same output can be achieved without iteration as below
FINDALL
=LAMBDA(txt,dl,
LET(
vPos,SEQUENCE(LEN(txt)),
vChars,MID(txt,vPos,1),
result,FILTER(vPos,vChars=dl),
result))