I´m aware of creating reusable LAMBDA functions. However, wanted to know if it is possible to create the reusable functions for a piece of formula in which LAMBDA is part.
For example, consider the source table below. Dynamic array is used to sort a column. Is it possible to create a reusable function for the DROP, which includes LAMBDA within it? I intend to use the entire DROP part with varying arrays for TEXTSPLIT function. I may pass different arrays to this reusable function to sort.
Source table:
Sort:
For example, consider the source table below. Dynamic array is used to sort a column. Is it possible to create a reusable function for the DROP, which includes LAMBDA within it? I intend to use the entire DROP part with varying arrays for TEXTSPLIT function. I may pass different arrays to this reusable function to sort.
Excel Formula:
DROP(REDUCE("",d,LAMBDA(x,y,VSTACK(x,TEXTJOIN(",",TRUE,SORT(TOCOL(TEXTSPLIT(y,","))))))),1)
Source table:
excel problems.xlsx | |||||
---|---|---|---|---|---|
B | C | D | |||
2 | id | desc | compare | ||
3 | 1 | dd,aa,mm | mismatch-aa | ||
4 | 2 | bbb | |||
5 | 3 | kk,tt,cc,2e | |||
6 | 4 | p,yu | |||
7 | 5 | ij,gt,fx,w,m6t | mismatch-m6t | ||
8 | 6 | h | |||
9 | 7 | df,ao | |||
10 | 8 | pmk,q,88,un,zt | |||
11 | 9 | ec,bl | match | ||
12 | 10 | 72,hp,fv | match | ||
Sheet8 |
Sort:
excel problems.xlsx | |||
---|---|---|---|
K | |||
3 | aa,dd,mm | ||
4 | bbb | ||
5 | 2e,cc,kk,tt | ||
6 | p,yu | ||
7 | fx,gt,ij,m6t,w | ||
8 | h | ||
9 | ao,df | ||
10 | 88,pmk,q,un,zt | ||
11 | bl,ec | ||
12 | 72,fv,hp | ||
Sheet8 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
K3:K12 | K3 | =LET( d,source[desc], dExtract, DROP(REDUCE("",d,LAMBDA(x,y,VSTACK(x,TEXTJOIN(",",TRUE,SORT(TOCOL(TEXTSPLIT(y,","))))))),1), dExtract) |
Dynamic array formulas. |