|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
本帖最后由 jianbing 于 2014-10-7 16:20 编辑
- =SUM((C$14:C$31=G24)*INDEX(INDEX(B$10:G$10,N(IF(1,MOD(ROW($1:$18)-1,6)+1))),N(IF(1,MATCH(B$14:B$31/1%%+D$14:D$31,LARGE(IF(MATCH(B$14:B$31/1%%+D$14:D$31,B$14:B$31/1%%+D$14:D$31,)=ROW($1:$18),B$14:B$31/1%%+D$14:D$31,B$14:B$31/1%%),ROW($1:$18)),)))))
复制代码 参与一下吧。几年没接触Excel, 有点转向了。
简化一下- =SUM((C$14:C$31=G24)*INDEX(INDEX(B$10:G$10,N(IF(1,MOD(ROW($1:$18)-1,6)+1))),N(IF(1,MATCH(B$14:B$31/1%%+D$14:D$31,LARGE(IF(MATCH(B$14:B$31&D$14:D$31,B$14:B$31&D$14:D$31,)=ROW($1:$18),B$14:B$31/1%%+D$14:D$31,B$14:B$31/1%%),ROW($1:$18)),)))))
复制代码 改变一下思路,内存数组公式,194字符,接近成功 :)- =MMULT(N(G24:G29=TRANSPOSE(C14:C31)),N(OFFSET(A10,,MOD(MATCH(B14:B31/1%%+D14:D31,LARGE(IF(MATCH(B14:B31&D14:D31,B14:B31&D14:D31,)=ROW(1:18),B14:B31/1%%+D14:D31,B14:B31/1%%),ROW(1:18)),)-1,6)+1)))
复制代码 终于好好象成功了 :) 185 字符。 结果对了- =MMULT(N(G24:G29=TRANSPOSE(C14:C31)),INDEX(B10:G10,MOD(MATCH(B14:B31+D14:D31%%,LARGE(IF(MATCH(B14:B31&D14:D31,B14:B31&D14:D31,)=ROW(1:18),B14:B31+D14:D31%%,B14:B31),ROW(1:18)),)-1,6)+1))
复制代码 |
评分
-
1
查看全部评分
-
|