我是个菜鸟,接触EXCEL大半年时间,我用不久前学会SUM()数组公式做了一个很长的公式(如果定义名称由会短些),结果是正确的,所以就拿出来献丑了.我总感觉这个公式排列很有规律,可以大幅缩短,但能力有限,请高手赐教!
=SUM(($B$7:$B$15=G21)*$C$6*(($C$7:$C$15=$G$10)*$H$10+($C$7:$C$15=$G$11)*$H$11+($C$7:$C$15=$G$12)*$H$12+($C$7:$C$15=$G$13)*$H$13))+SUM(($B$7:$B$15=G21)*$D$6*(($D$7:$D$15=$G$10)*$H$10+($D$7:$D$15=$G$11)*$H$11+($D$7:$D$15=$G$12)*$H$12+($D$7:$D$15=$G$13)*$H$13))+SUM(($B$7:$B$15=G21)*$E$6*(($E$7:$E$15=$G$10)*$H$10+($E$7:$E$15=$G$11)*$H$11+($E$7:$E$15=$G$12)*$H$12+($E$7:$E$15=$G$13)*$H$13))
或者
=SUM(($B$7:$B$15=G21)*$C$6*($C$7:$C$15=CHOOSE({1,2,3,4},$G$10,$G$11,$G$12,$G$13))*CHOOSE({1,2,3,4},$H$10,$H$11,$H$12,$H$13))+SUM(($B$7:$B$15=G21)*$D$6*($D$7:$D$15=CHOOSE({1,2,3,4},$G$10,$G$11,$G$12,$G$13))*CHOOSE({1,2,3,4},$H$10,$H$11,$H$12,$H$13))+SUM(($B$7:$B$15=G21)*$E$6*($E$7:$E$15=CHOOSE({1,2,3,4},$G$10,$G$11,$G$12,$G$13))*CHOOSE({1,2,3,4},$H$10,$H$11,$H$12,$H$13))
按Ctrl+Shift+Enter结尾.
7Fpcyh1T.rar
(3.17 KB, 下载次数: 37)
[此贴子已经被作者于2006-3-16 13:31:42编辑过] |