求助以最后4天的数据计算筛选达标的公式
想求个公式,每天都会增加数据,只计算最后的4天数据,最后4天每天都>=前一天,就达标,先谢谢各位大佬.
=IF(AND(OFFSET($A$1,ROW(A1),MATCH(TODAY(),$A$1:$H$1)-2)>=OFFSET($A$1,ROW(A1),MATCH(TODAY(),$A$1:$H$1)-3),OFFSET($A$1,ROW(A1),MATCH(TODAY(),$A$1:$H$1)-3)>=OFFSET($A$1,ROW(A1),MATCH(TODAY(),$A$1:$H$1)-4),OFFSET($A$1,ROW(A1),MATCH(TODAY(),$A$1:$H$1)-4)>=OFFSET($A$1,ROW(A1),MATCH(TODAY(),$A$1:$H$1)-5)),"达标","") =IF(AND(MMULT({1,-1},N(OFFSET($A2,,COUNT(A2:H2)-{4,3,2,1}+{0;-1})))>=0),"达标","") =IF(AND(N(OFFSET(OFFSET(A2,,MATCH(TODAY(),$1:$1,)-2),,1-ROW($1:$4)))>=N(OFFSET(OFFSET(A2,,MATCH(TODAY(),$1:$1,)-2),,0-ROW($1:$4)))),"达标","")抄楼上大佬的思路。说明比如今天20日,只会计算19日往前的结果,不会计算当日的结果。 谢谢大佬 谢谢, 谢谢, I2{=REPT("达标",IFERROR(AND(OFFSET(A2,,COUNTA(A2:H2)-1,,-3)-OFFSET(A2,,COUNTA(A2:H2)-2,,-3)>=0),)) 公式写在达 标列,可 支 持中 间插入列
=IF(AND(MMULT({1,-1},SUBTOTAL(9,OFFSET(INDIRECT("rc"&LOOKUP(1,0/LEN($A2:INDIRECT("rc[-1]",)),COLUMN($A2:INDIRECT("rc[-1]",))),),,-{0,1,2,3}-{0;1})))>=0),"达标","") 练习使用 INDIRECT 的 R1C1 写法,对插入、移ˊ动比较有弹性
=IF(AND(MMULT({1,-1},N(INDIRECT("rc"&COUNT(INDIRECT("rc1:rc[-1]",))-{0,1,2,3}-{0;1},)))>=0),"达标","")
页:
[1]