楼主需要的是不是这个样子?
I2(即示例中E2):
- =LET(Srb,B2:B941,Srd,INT(D2:D941),fx,LAMBDA(XX,YY,LET(t,FREQUENCY(XX-YY,SEQUENCE(21,,-10)),st,XMATCH(0,TAKE(t,11),,-1),se,XMATCH(0,DROP(t,10),),sn,10-st+se-1,sn)),Sn,SCAN(0,Srb,LAMBDA(x,y,IF(y=OFFSET(y,-1,),x,x+1))),Sa,MAP(Srd,SEQUENCE(ROWS(Srb)),LAMBDA(x,y,LET(sNum,INDEX(Sn,y),sDate,FILTER(Srd,Sn=sNum),Tc,fx(x,sDate),Tc))),IF(Sa<2,"未连投","连续重投"&Sa&"天"))
复制代码
J2(即示例中F2):
- =LET(Srh,H2:H941,Srd,INT(D2:D941),fx,LAMBDA(XX,YY,LET(t,FREQUENCY(XX-YY,SEQUENCE(21,,-10)),st,XMATCH(0,TAKE(t,11),,-1),se,XMATCH(0,DROP(t,10),),sn,10-st+se-1,sn)),Sn,MAP(Srh,LAMBDA(x,XLOOKUP(x,UNIQUE(Srh),SEQUENCE(ROWS(UNIQUE(Srh))),,))),Sa,MAP(Srd,SEQUENCE(ROWS(Srd)),LAMBDA(x,y,LET(sNum,INDEX(Sn,y),sDate,FILTER(Srd,Sn=sNum),Tc,fx(x,sDate),Tc))),IF(Sa<2,"未连投","连续重投"&Sa&"天"))
复制代码
结果显示,示例中有几处遗漏。
|