本帖最后由 edwin11891 于 2024-12-11 12:32 编辑
- =LET(fx,LAMBDA(X,Y,IFNA(HSTACK(X,Y),Y)),ta,fx(A2:B6,B1),tb,fx(D2:E6,E1),tc,fx(G2:H6,H1),s,VSTACK(ta,tb,tc),t,PIVOTBY(TAKE(s,,1),TAKE(s,,-1),CHOOSECOLS(s,2),SINGLE,0,0,,0),HSTACK(VSTACK("门店",DROP(TAKE(t,,1),1)),DROP(t,,1),VSTACK("次数",BYROW(DROP(t,1,1),LAMBDA(x,SUM(N(x<>"")))))))
复制代码
=LET(fx,LAMBDA(X,Y,IFNA(HSTACK(X,Y),Y)),ta,fx(A2:B6,B1),tb,fx(D2:E6,E1),tc,fx(G2:H6,H1),s,VSTACK(ta,tb,tc),t,PIVOTBY(TAKE(s,,1),TAKE(s,,-1),CHOOSECOLS(s,2),SINGLE,0,0,,0),HSTACK(VSTACK("门店",DROP(TAKE(t,,1),1)),DROP(t,,1),VSTACK("次数",BYROW(DROP(t,1,1),LAMBDA(x,SUM(N(x<>""))))))) |