B6公式:
=LET(bm_12,"'"&SEQUENCE(,12)&"月(天)'",
wk_add,bm_12&"!D6:AI6",
wk_sz,DROP(REDUCE("",wk_add,LAMBDA(x,y,HSTACK(x,INDIRECT(y)))),,1),
bb,bm_12&"!B:B",
dd,bm_12&"!d:d",
d_ai1hh,MAP(bb,dd,LAMBDA(x,y,ROW(XLOOKUP("汇总",INDIRECT(x),INDIRECT(y),"",0)))),
d_ai1_add,bm_12&"!D"&d_ai1hh&":AI"&d_ai1hh,
d_ai1_sl,DROP(REDUCE("",d_ai1_add,LAMBDA(x,y,HSTACK(x,INDIRECT(y)))),,1),
SUM((wk_sz=B4)*N(d_ai1_sl)))
B7公式:
=LET(bm_12,"'"&SEQUENCE(,12)&"月(天)'",
wk_add,bm_12&"!D6:AI6",
wk_sz,DROP(REDUCE("",wk_add,LAMBDA(x,y,HSTACK(x,INDIRECT(y)))),,1),
bb,bm_12&"!B:B",
dd,bm_12&"!d:d",
d_ai2hh,MAP(bb,dd,LAMBDA(x,y,ROW(XLOOKUP("汇总",INDIRECT(x),INDIRECT(y),"",0))+1)),
d_ai2_add,bm_12&"!D"&d_ai2hh&":AI"&d_ai2hh,
d_ai2_sl,DROP(REDUCE("",d_ai2_add,LAMBDA(x,y,HSTACK(x,INDIRECT(y)))),,1),
SUM((wk_sz=B4)*N(d_ai2_sl)))
向右拖
上面的整体复制到下面 |