本帖最后由 leepoison 于 2024-6-28 22:27 编辑
- =MAP(A2:A10,LAMBDA(t,FILTER(FILTER(FILTER(UNIQUE(TOCOL(MID(t,SEQUENCE(LEN(t)),SEQUENCE(,LEN(t),2)))),LEN(UNIQUE(TOCOL(MID(t,SEQUENCE(LEN(t)),SEQUENCE(,LEN(t),2)))))>1),MAP(FILTER(UNIQUE(TOCOL(MID(t,SEQUENCE(LEN(t)),SEQUENCE(,LEN(t),2)))),LEN(UNIQUE(TOCOL(MID(t,SEQUENCE(LEN(t)),SEQUENCE(,LEN(t),2)))))>1),LAMBDA(x,COLUMNS(REGEXP(CONCAT($A$2:$A$10),x))))=MAX(MAP(FILTER(UNIQUE(TOCOL(MID(t,SEQUENCE(LEN(t)),SEQUENCE(,LEN(t),2)))),LEN(UNIQUE(TOCOL(MID(t,SEQUENCE(LEN(t)),SEQUENCE(,LEN(t),2)))))>1),LAMBDA(x,COLUMNS(REGEXP(CONCAT($A$2:$A$10),x)))))),LEN(FILTER(FILTER(UNIQUE(TOCOL(MID(t,SEQUENCE(LEN(t)),SEQUENCE(,LEN(t),2)))),LEN(UNIQUE(TOCOL(MID(t,SEQUENCE(LEN(t)),SEQUENCE(,LEN(t),2)))))>1),MAP(FILTER(UNIQUE(TOCOL(MID(t,SEQUENCE(LEN(t)),SEQUENCE(,LEN(t),2)))),LEN(UNIQUE(TOCOL(MID(t,SEQUENCE(LEN(t)),SEQUENCE(,LEN(t),2)))))>1),LAMBDA(x,COLUMNS(REGEXP(CONCAT($A$2:$A$10),x))))=MAX(MAP(FILTER(UNIQUE(TOCOL(MID(t,SEQUENCE(LEN(t)),SEQUENCE(,LEN(t),2)))),LEN(UNIQUE(TOCOL(MID(t,SEQUENCE(LEN(t)),SEQUENCE(,LEN(t),2)))))>1),LAMBDA(x,COLUMNS(REGEXP(CONCAT($A$2:$A$10),x)))))))=MAX(LEN(FILTER(FILTER(UNIQUE(TOCOL(MID(t,SEQUENCE(LEN(t)),SEQUENCE(,LEN(t),2)))),LEN(UNIQUE(TOCOL(MID(t,SEQUENCE(LEN(t)),SEQUENCE(,LEN(t),2)))))>1),MAP(FILTER(UNIQUE(TOCOL(MID(t,SEQUENCE(LEN(t)),SEQUENCE(,LEN(t),2)))),LEN(UNIQUE(TOCOL(MID(t,SEQUENCE(LEN(t)),SEQUENCE(,LEN(t),2)))))>1),LAMBDA(x,COLUMNS(REGEXP(CONCAT($A$2:$A$10),x))))=MAX(MAP(FILTER(UNIQUE(TOCOL(MID(t,SEQUENCE(LEN(t)),SEQUENCE(,LEN(t),2)))),LEN(UNIQUE(TOCOL(MID(t,SEQUENCE(LEN(t)),SEQUENCE(,LEN(t),2)))))>1),LAMBDA(x,COLUMNS(REGEXP(CONCAT($A$2:$A$10),x)))))))))))
复制代码 LET 完之后居然就不能用了,有人来帮忙DEBUG吗???
=MAP(A2:A10, LAMBDA(t,
LET(
a, SEQUENCE(LEN(t)),
b, TOCOL(MID(t, a, SEQUENCE(, LEN(t), 2))),
c, UNIQUE(b),
d, FILTER(c, LEN(c) > 1),
e, MAX(MAP(d, LAMBDA(x, COLUMNS(REGEXP(CONCAT($A$2:$A$10), x))))),
f, FILTER(d, MAP(d, LAMBDA(x, COLUMNS(REGEXP(CONCAT($A$2:$A$10), x)))) = e),
g, LEN(f),
MAX(g)
)
))
|