hugeinfo 发表于 2024-12-25 17:28
=LET(c,DROP(REDUCE("",SHEETSNAME(,1,1),LAMBDA(x,y,VSTACK(x,GROUPBY(SCAN(,INDIRECT(y&"!A3:A200"),LA ...
借用一下公式,将行日期补齐:
- =LET(c,DROP(REDUCE("",SHEETSNAME(,1,1),LAMBDA(x,y,VSTACK(x,GROUPBY(SCAN(,INDIRECT(y&"!A3:A200"),LAMBDA(m,n,IF(n<>"",n,m))),INDIRECT(y&"!C3:J200"),CHOOSE({1,2},SUM,TOCOL(INDIRECT(y&"!C1:J1"))),,0)))),1),d,FILTER(c,CHOOSECOLS(c,2)<>0),s,CHOOSECOLS(d,2),n,MAX(s)-MIN(s)+1,e,VSTACK(d,HSTACK(REPTARRAY(TAKE(d,1,1),n),SEQUENCE(n,,MIN(s)),REPTARRAY(0,n))),St,PIVOTBY(TAKE(e,,1),CHOOSECOLS(e,2),TAKE(e,,-1),LAMBDA(x,IF(ISNUMBER(0/SUM(x)),SUM(x),"")),,0,,0),St)
复制代码
|