本帖最后由 xingqiliu666 于 2022-12-15 13:27 编辑
- =INDEX(INDEX(IF(IF(TRANSPOSE(SEQUENCE(3)^0),SEQUENCE(7))<=IF(SEQUENCE(7)^0,VLOOKUP(LEFT($A$2:$C$2,1),$E$2:$F$4,2,0)),$A$2:$C$8,""),MOD(SEQUENCE(7*3)-1,7)+1,ROUNDUP(SEQUENCE(7*3)/7,0)),SMALL(IF(INDEX(IF(IF(TRANSPOSE(SEQUENCE(3)^0),SEQUENCE(7))<=IF(SEQUENCE(7)^0,VLOOKUP(LEFT($A$2:$C$2,1),$E$2:$F$4,2,0)),$A$2:$C$8,""),MOD(SEQUENCE(7*3)-1,7)+1,ROUNDUP(SEQUENCE(7*3)/7,0))<>"",SEQUENCE(7*3)),ROW(A1)))
复制代码
调整顺序后的公式:
- =INDEX(INDEX(IF(IF({1,1,1},SEQUENCE(7))<=IF(SEQUENCE(7)^0,TRANSPOSE($F$2:$F$4)),CHOOSE(TRANSPOSE(MATCH($E$2:$E$4&"*",$A$2:$C$2,0)),$A$2:$A$8,$B$2:$B$8,$C$2:$C$8),""),MOD(SEQUENCE(21)-1,7)+1,ROUNDUP(SEQUENCE(21)/7,)),SMALL(IF(INDEX(IF(IF({1,1,1},SEQUENCE(7))<=IF(SEQUENCE(7)^0,TRANSPOSE($F$2:$F$4)),CHOOSE(TRANSPOSE(MATCH($E$2:$E$4&"*",$A$2:$C$2,0)),$A$2:$A$8,$B$2:$B$8,$C$2:$C$8),""),MOD(SEQUENCE(21)-1,7)+1,ROUNDUP(SEQUENCE(21)/7,))<>"",SEQUENCE(21)),ROW(A1)))
复制代码
|