本帖最后由 mykitami 于 2023-9-19 23:16 编辑
=LET(
all_rq,日产量!$B$1:$K$1,
all_cp,日产量!$A$2:$A$8,
rq,C$1,
wl,$B2,
_cp,来源表!$A$2:$A$43,
_wl,来源表!$D$2:$D$43,
_yl,来源表!$E$2:$E$43,
c,CHOOSECOLS(DROP(REDUCE("",all_rq,LAMBDA(xx,yy,LET(a,DROP(REDUCE("",OFFSET(yy,1,0,ROWS(all_cp),1),LAMBDA(x,y,LET(pp,_cp=OFFSET(y,0,-COLUMN(y)+1),VSTACK(x,HSTACK(FILTER(_wl,pp,""),FILTER(_yl*y,pp,"")))))),1),HSTACK(xx,VSTACK(HSTACK("",yy),a))))),,1),1,SEQUENCE(,COLUMNS(all_rq),2,2)),
s,SUM((DROP(TAKE(c,1),,1)=rq)*(DROP(TAKE(c,,1),1)=wl)*DROP(DROP(c,1),,1)),s)
不知道你的版本,我用的是MS365
|