疑问:M列选择的城市是否连续?即城市与城市之间能不能有空单元格~
可以连续,也可以不连续,但如果只针对连续也算正确 -willin2000
呵呵,那就先交个答案,适用于连续和非连续两种情况~
可以修改其中的数字来适应城市的增加和数据行的增加~
281个字符:
=IF(ROW()>4*COUNTA($M:$M)-3,"",LOOKUP(INDEX(INT(--RIGHT(LARGE(SUMIF(OFFSET($A$2,,{0,3,6,9},80),$M$2:$M$10,OFFSET($C$2,,{0,3,6,9},))*100+{1,4,7,10}+ROW($1:$9)%,ROW(A1)),{5,2,9})*{1,1,0.01}),COLUMN(A1)),ROW($1:$1000),CHOOSE(COLUMN(A1),TRANSPOSE($A$1:$L$1),$M$2:$M$10,ROW($1:$1000))))
270个字符
=IF(ROW()>4*COUNTA($M:$M)-3,"",LOOKUP(INDEX(RIGHT(LARGE(SUMIF(OFFSET($A$2,,{0,3,6,9},80),$M$2:$M$10,OFFSET($C$2,,{0,3,6,9},80))+{1,4,7,10}%+ROW($2:$10)%%,ROW(A1)),{4,2,9})/{100,1,1},COLUMN(A1)),ROW($1:$1000),CHOOSE(COLUMN(A1),TRANSPOSE($1:$1),$M$1:$M$10,ROW($1:$1000))))
253字符
=IF(ROW()>4*COUNTA($M:$M)-3,"",INDEX(CHOOSE(COLUMN(A1),TRANSPOSE($1:$1),$M$1:$M$10,ROW($1:$1000)),INDEX(RIGHT(LARGE(SUMIF(OFFSET($A$2,,{0,3,6,9},80),$M$2:$M$10,OFFSET($C$2,,{0,3,6,9},))+{1,4,7,10}%+ROW($2:$10)%%,ROW(A1)),{4,2,9})/{100,1,1},COLUMN(A1))))
excel07中 248字符
=IF(ROW()>4*COUNTA($M:$M)-3,"",INDEX(CHOOSE(COLUMN(A1),TRANSPOSE($1:$1),$M:$M,ROW($1:$1000)),INDEX(RIGHT(LARGE(SUMIF(OFFSET($A$2,,{0,3,6,9},80),$M$2:$M$10,OFFSET($C$2,,{0,3,6,9},))+{1,4,7,10}%+ROW($2:$10)%%,ROW(A1)),{4,2,9})/{100,1,1},COLUMN(A1)))) |