本帖最后由 delete_007 于 2013-5-24 16:23 编辑
最初打算用COUNTIF配合OFFSET得出每列(列加权)从下至上等于1的行数,然后mod+SMALL得出第7,8,37,38,67.....所在的行数,最后用SUM+SUBTOTAL+OFFSET或者INDIRECT求和,但。。。。。超套。。。。。翻来覆去两三天,依然。。。。超套。。。。(看来这种方式根本就不对),想放弃又心有不甘,不是正确就给1个技术分吗,请欣赏838字- =SUM((MMULT(1*(ROW(2:31)>32-SMALL(IF(FREQUENCY(ROW(1:10)-1,N(OFFSET(A31,,,-ROW(1:29)))),ROW(1:29)),{8,7})),{1;1})=1)*A2:A31+(MMULT(1*(ROW(2:31)>32-SMALL(IF(FREQUENCY(ROW(1:10)-1,N(OFFSET(B31,,,-ROW(1:29)))),ROW(1:29)),{8,7})),{1;1})=1)*B2:B31+(MMULT(1*(ROW(2:31)>32-SMALL(IF(FREQUENCY(ROW(1:10)-1,N(OFFSET(C31,,,-ROW(1:29)))),ROW(1:29)),{8,7})),{1;1})=1)*C2:C31+(MMULT(1*(ROW(2:31)>32-SMALL(IF(FREQUENCY(ROW(1:10)-1,N(OFFSET(D31,,,-ROW(1:29)))),ROW(1:29)),{8,7})),{1;1})=1)*D2:D31+(MMULT(1*(ROW(2:31)>32-SMALL(IF(FREQUENCY(ROW(1:10)-1,N(OFFSET(E31,,,-ROW(1:29)))),ROW(1:29)),{8,7})),{1;1})=1)*E2:E31+(MMULT(1*(ROW(2:31)>32-SMALL(IF(FREQUENCY(ROW(1:10)-1,N(OFFSET(F31,,,-ROW(1:29)))),ROW(1:29)),{8,7})),{1;1})=1)*F2:F31+(MMULT(1*(ROW(2:31)>32-SMALL(IF(FREQUENCY(ROW(1:10)-1,N(OFFSET(G31,,,-ROW(1:29)))),ROW(1:29)),{8,7})),{1;1})=1)*G2:G31)
复制代码
- =SUM(SUBTOTAL(9,OFFSET(A2,,ROW(1:7)-1,MOD(SMALL(IF(COUNTIF(OFFSET(A2,{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29},{0;1;2;3;4;5;6},30),TRANSPOSE(A2:G31))=1,ROW(1:7)/1%+COLUMN(B:AE),ROW(1:7)/1%+32),ROW(1:7)*30-{26,27}),100)-1))*{1,-1})
复制代码
补充内容 (2013-6-6 13:19):
185字,憋死了
=SUM(SUBTOTAL(9,OFFSET(A2,,7-COLUMN(A:G),MOD(LARGE((COUNTIF(OFFSET(A2,COLUMN(A:AD)-1,ROW(1:7)-1,30),TRANSPOSE(A2:G31))=1)*(ROW(1:7)/1%+COLUMN(A:AD)),COLUMN(A:G)*10-{3;2}),100)))*{1;-1})
补充内容 (2013-6-7 07:33):
177字,卡在门槛两步之遥
=SUM(SUBTOTAL(9,OFFSET(A2,,7-ROW(1:7),MOD(LARGE((COUNTIF(OFFSET(A1,COLUMN(A:AD),ROW(1:7)-1,30),TRANSPOSE(A2:G31))=1)*(ROW(1:7)/1%+COLUMN(A:AD)),ROW(1:7)*10-{3,2}),100)))*{1,-1})
补充内容 (2013-6-7 12:48):
166字,终于突破门槛
=SUM(SUBTOTAL(9,OFFSET(A2,,7-ROW(1:7),MOD(LARGE((COUNTIF(OFFSET(A1,ROW(1:30),COLUMN(A:G)-1,30),A2:G31)=1)*(ROW(1:30)+COLUMN(A:G)/1%),ROW(1:7)*10-{3,2}),100)))*{1,-1}) |