本帖最后由 我走我流 于 2019-1-30 23:02 编辑
=MIN(IFNA(LOOKUP(IF((ROW($1:$6)>=LOOKUP(1,-FIND(LEFT(A2,2),F$2:F$7),ROW($1:$6)))*((ROW($1:$6)<LOOKUP(1,-FIND(RIGHT(A2,2),F$2:F$7),ROW($1:$6)))),ROW($1:$6)),COLUMN($A:$F),1028-MMULT(SUMIFS(B:B,A:A,T(OFFSET(F$2:F$6,ROW($1:$6)-1,,-COLUMN($A:$F)))&"*"),ROW($1:$6)^0)+MMULT(SUMIFS(B:B,A:A,"*"&T(OFFSET(F$2:F$6,ROW($1:$6)-1,,-COLUMN($A:$F)))),ROW($1:$6)^0)),9^9))
357字太长了, 精简下,=MIN(LOOKUP(ROW(INDIRECT(LOOKUP(1,-FIND(LEFT(A2,2),F$2:F7),ROW($1:6))&":"&LOOKUP(1,-FIND(RIGHT(A2,2),F$2:F7),ROW($1:6))-1)),COLUMN(A:F),1028-MMULT(SUMIFS(B:B,A:A,T(OFFSET(F$1,ROW($1:$6),,-COLUMN(A:F)))&"*")-SUMIFS(B:B,A:A,"*"&T(OFFSET(F$1,ROW($1:$6),,-COLUMN(A:F)))),ROW(1:6)^0))) 280个字,还差的多=MIN(LOOKUP(ROW(INDIRECT(TEXTJOIN(":",,LARGE(ISNUMBER(FIND(F$2:F$7,A2))*ROW($1:$6),{2,1})-{0,1}))),COLUMN(A:F),1028+MMULT(ISERR(-MID(BASE(2^ROW($1:$6)-1,2),COLUMN(A:F),1))-1,SUMIF(A:A,F$2:F$7&"*",B:B)-SUMIF(A:A,"*"&F$2:F$7,B:B)))) 228
=MIN(LOOKUP(ROW(INDIRECT(TEXTJOIN(":",,LARGE(ISNUMBER(FIND(F$2:F$7,A2))*ROW($1:$6),{2,1})-{0,1}))),COLUMN(A:F),1028+MMULT(-MID(LEFT(1/9,ROW($3:$8))*10^6,COLUMN(A:F),1),SUMIF(A:A,F$2:F$7&"*",B:B)-SUMIF(A:A,"*"&F$2:F$7,B:B)))) 224字。。。。
|