Excel精英培训网

 找回密码
 注册
数据透视表40+个常用小技巧,让你一次学会!
查看: 5516|回复: 7

多条件求和sumproduct(条件1*条件2*.....)在VBA中如何实现

[复制链接]
发表于 2008-2-15 16:35 | 显示全部楼层 |阅读模式
<p> 在工作表中可以用sumproduct可以在工作表中设置公式,进行多条件求和,在VBA如何使用Sumproduct函数进行多条件求和计算呢?</p>
发表于 2008-2-15 16:36 | 显示全部楼层
回复

使用道具 举报

发表于 2008-2-15 16:39 | 显示全部楼层
回复

使用道具 举报

发表于 2008-2-15 16:40 | 显示全部楼层

<div class="msgheader">QUOTE:</div><div class="msgborder"><b>以下是引用<i>我是特特</i>在2008-2-15 16:39:00的发言:</b><br/>感觉像是部长专场</div><p></p><p>穷人啊,没办法[em01]</p><p>工作去[em04]</p>
回复

使用道具 举报

 楼主| 发表于 2008-2-15 16:41 | 显示全部楼层

<div class="msgheader">QUOTE:</div><div class="msgborder"><b>以下是引用<i>element</i>在2008-2-15 16:36:00的发言:</b><br/>用evaluate方法比较多</div><p>请详细些,把sumproduct写进去,让新手能看个明白.</p>
回复

使用道具 举报

发表于 2008-2-15 16:48 | 显示全部楼层

<table class="tableup" cellspacing="4" cellpadding="4" width="100%" border="0"><tbody><tr><th>A</th><th>B</th><th>C</th><th>D</th></tr><tr><th>Array&nbsp;1</th><th>Array&nbsp;1</th><th>Array&nbsp;2</th><th>Array&nbsp;2</th></tr><tr valign="top"><td>3</td><td>4</td><td>2</td><td>7</td></tr><tr valign="top"><td>8</td><td>6</td><td>6</td><td>7</td></tr><tr valign="top"><td>1</td><td>9</td><td>5</td><td>3</td></tr><tr><th>公式</th><th>说明(结果)</th></tr><tr valign="top"><td>=SUMPRODUCT(A2:B4, C2:D4)</td><td>两个数组的所有元素对应相乘,然后把乘积相加,即 3*2 + 4*7 + 8*6 + 6*7 + 1*5 + 9*3。(156)</td></tr></tbody></table><p>&nbsp;</p><p>&nbsp;</p><p>[E2] = Evaluate("SUMPRODUCT(A2:B4, C2:D4)")</p>
[此贴子已经被作者于2008-2-15 16:50:33编辑过]
回复

使用道具 举报

发表于 2008-12-17 22:53 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

发表于 2013-7-9 20:30 | 显示全部楼层
这个题没答案?
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|Excel精英培训 ( 豫ICP备11015029号 )

GMT+8, 2025-8-16 05:16 , Processed in 0.344532 second(s), 5 queries , Gzip On, Yac On.

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表