SUMIFs使用Excel VBA

编程入门 行业动态 更新时间:2024-10-18 01:37:24
本文介绍了SUMIFs使用Excel VBA的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我无法理解VBA中的SUMIF的概念,有人可以剖析以下代码?

如果WorksheetFunction.SumIf (ActiveSheet.Columns(3),Range(C&6)。Value,ActiveSheet.Columns(9))/ WorksheetFunction.CountIf(ActiveSheet.Columns(3),Range(C&6 ).Value)= Range(I&6)。然后

解决方案

这部分: -

SumIf(ActiveSheet.Columns(3),Range &6)。Value,ActiveSheet.Columns(9))

: -

将第一列(第9列)中的所有值添加到单元格C6中的值出现在列C(第3列)的相应行中。

SUMIF(包含搜索列)价值,要搜索的值,列附加项添加)

希望这有帮助。

I am not able to comprehend the concept of SUMIFs in VBA can someone dissect the following code?

If WorksheetFunction.SumIf(ActiveSheet.Columns(3), Range("C" & "6").Value, ActiveSheet.Columns(9)) / WorksheetFunction.CountIf(ActiveSheet.Columns(3), Range("C" & "6").Value) = Range("I" & "6").Value Then

解决方案

This part:-

SumIf(ActiveSheet.Columns(3), Range("C" & "6").Value, ActiveSheet.Columns(9))

Basically reads like this:-

Add together all the values in Column I (9th column) where the value in Cell C6 appears in the corresponding row in Column C (3rd column).

SUMIF broken down looks like this:-

SUMIF(Column containing search values, value to search for, column conaintining items to add)

Hope this helps.

更多推荐

SUMIFs使用Excel VBA

本文发布于:2023-11-22 06:35:15,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1616339.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:SUMIFs   Excel   VBA

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!