[英]VBA find value x in column A and value y in column B and sum values in column C
following problem: 以下问题:
Let's say my file looks like this: 假设我的文件如下所示:
Column A | Column B | Column C
ABCDEFI | 7000 | 50
ABCDEFI | 7500 | 20
ABCDIFE | 7000 | 30
ABCDEFI | 7500 | 80
I want to look for "ABCDEFI" in Column A and for "7500" in Column B and sum up the corresponding values of Column C and store them in Column D. 我想在A列中查找“ ABCDEFI”,在B列中查找“ 7500”,并汇总C列的相应值并将它们存储在D列中。
In this case the end result should be "100" in Column D. 在这种情况下,最终结果在D列中应为“ 100”。
Hope that makes sense. 希望有道理。
Happy to see read your answers. 很高兴看到您的答案。
非常简单的SUMIFS()将起作用:
=SUMIFS(C:C,A:A,"ABCDEFI",B:B,7500)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.