本帖最后由 你是那块小饼干 于 2024-12-21 12:04 编辑
- =LET(T,SCAN(0,$A$1:$A$33,LAMBDA(X,Y,IF(Y="省份",X+1,X))),IF(XLOOKUP(G2,$A$1:$A$33,T)=1,IF(I2<=1.5,LOOKUP(I2,HSTACK({0;0.5;1.5},TOCOL(CHOOSEROWS(CHOOSECOLS($B$2:$F$33,1,2,4),MATCH(G2,$A$2:$A$33,0))))),SUM(LOOKUP(I2,HSTACK({0;0.5;1.5},TOCOL(CHOOSEROWS(CHOOSECOLS($B$2:$F$33,1,2,4),MATCH(G2,$A$2:$A$33,0))))),XLOOKUP(G2,$A$2:$A$33,$F$2:$F$33)*(I2-1.5))),
- IF(I2<=1,XLOOKUP(G2,$A$2:$A$33,$B$2:$B$33),SUM(XLOOKUP(G2,$A$2:$A$33,$B$2:$B$33),XLOOKUP(G2,$A$2:$A$33,$F$2:$F$33)*(I2-1)))))
复制代码 表格做的不标准 按自己理解写的 供参考
- =LET(T,SCAN(0,$A$1:$A$33,LAMBDA(X,Y,IF(Y="省份",X+1,X))),LET(_X,LOOKUP(I2,HSTACK({0;0.5;1.5},TOCOL(CHOOSEROWS(CHOOSECOLS($B$2:$F$33,1,2,4),MATCH(G2,$A$2:$A$33,0))))),_Y,XLOOKUP(G2,$A$2:$A$33,$F$2:$F$33),_Z,XLOOKUP(G2,$A$2:$A$33,$B$2:$B$33),IF(XLOOKUP(G2,$A$1:$A$33,T)=1,IF(I2<=1.5,_X,SUM(_X,_Y*(I2-1.5))),IF(I2<=1,_Z,SUM(_Z,_Y*(I2-1))))))
复制代码
|