本帖最后由 edwin11891 于 2024-4-21 22:40 编辑
365函数一步到位:
- =REDUCE({"出码数","备注"},J3:J11,LAMBDA(xx,x,LET(s,OFFSET(x,,-8,,6),rs,TEXTJOIN(" ",,MAP(s,LAMBDA(y,IF((y>x)*(y<OFFSET(x,,1)),y,"")))),rn,IFERROR(ROWS(TEXTSPLIT(rs,," ")),0),VSTACK(xx,HSTACK(rn,rs)))))
复制代码
不用J、K列:
- =REDUCE({"起号","止号","出码数","备注"},A3:A11,LAMBDA(xx,x,LET(s,OFFSET(x,,1,,6),mr,OFFSET(x,-1,1,,6),mx,MAX(IF((TAKE(mr,,-5)-TAKE(mr,,5))=MAX(TAKE(mr,,-5)-TAKE(mr,,5)),TAKE(mr,,-5),0)),mn,MAX(IF((TAKE(mr,,-5)-TAKE(mr,,5))=MAX(TAKE(mr,,-5)-TAKE(mr,,5)),TAKE(mr,,5),0)),rs,TEXTJOIN(" ",,MAP(s,LAMBDA(y,IF((y>mn)*(y<mx),y,"")))),rn,IFERROR(ROWS(TEXTSPLIT(rs,," ")),0),VSTACK(xx,HSTACK(mn,mx,rn,rs)))))
复制代码
|