- =IFNA(DROP(REDUCE(0,K4:N4,LAMBDA(s,t,LET(_a,B4:B34,_b,FILTER(C4:G34,(_a=INDEX(_a,MATCH(t,_a,)-1))+(_a=t),""),_c,BYCOL(_b,LAMBDA(x,LET(_d,ISNUMBER(FIND(I5,x)),_e,INDEX(x,MATCH(1,_d*1,0)+1),IF(OR(_d),TAKE(x,1)&","&_e,)))),_f1,DROP(REDUCE(0,_c,LAMBDA(x,y,VSTACK(x,IF(y=0,EXPAND("",,2,""),TEXTSPLIT(y,","))))),1),_f2,IF(OR(ISNUMBER(FIND(I5,_b))),FILTER(_f1,TAKE(_f1,,1)<>""),""),HSTACK(s,TOCOL(SORT(HSTACK(TAKE(_f2,,1),--TAKE(_f2,,-1)),2,-1),3))))),,1),"")
复制代码- =LET(_c,DROP(REDUCE(0,K4:N4,LAMBDA(x,y,VSTACK(x,LET(_a,OFFSET(y,1,,10),_b,FILTER(_a,LEN(_a)>0),IF(SUM(LEN(_a))=0,"",y&"-"&SEQUENCE(ROWS(_b)/2)))))),1),FILTER(_c,_c<>""))
复制代码
|