在SUMIF功能中执行功能
我正在用sumif
函数在范围内使用:我希望以下格式:
A B
1 1.1 5
2 1.2 5
3 1.3 5
4 2.1 5
5 2.2 5
我希望sumif
通过其整数组合在一起,即:
A B
1 1 15
2 2 10
我可以通过创建一个第三列c
并应用int(a)
,以便:(
A B C
1 1.1 5 1
2 1.2 5 1
3 1.3 5 1
4 2.1 5 2
5 2.2 5 2
对于1)
=SUMIF(C:C, 1, B:B)
有没有办法在一个单元格中执行此操作?即
=SUMIF(A1:A5, "int(range) = 1", B1:B5)
我也尝试过:
=SUMIF(A1:A5, "1*", B1:B5)
但是
=SUMIF(A1:A5, 1&"*", B1:B5)
这些也不起作用
I am writing a SUMIF
function on a range with a format such as:
A B
1 1.1 5
2 1.2 5
3 1.3 5
4 2.1 5
5 2.2 5
I want the SUMIF
to group values together by their integer, i.e.:
A B
1 1 15
2 2 10
I can do this by creating a third column C
and applying INT(A)
so that:
A B C
1 1.1 5 1
2 1.2 5 1
3 1.3 5 1
4 2.1 5 2
5 2.2 5 2
and (for 1)
=SUMIF(C:C, 1, B:B)
Is there a way to do this in one cell? i.e.
=SUMIF(A1:A5, "int(range) = 1", B1:B5)
I have also tried:
=SUMIF(A1:A5, "1*", B1:B5)
and
=SUMIF(A1:A5, 1&"*", B1:B5)
But these also do not work
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以使用
sumproduct
egint($ a $ 1:$ a $ 5)= c1
生成true
s and code> false false的数组/代码> s。
-
操作员将其转换为0
s和1
s的数组。然后,您将乘以B中的值。 a7zow.png“ alt =”在此处输入图像描述”>
You can use
SUMPRODUCT
e.g.INT($A$1:$A$5)=C1
produces an array ofTRUE
s andFALSE
s. The--
operator converts that to an array of0
s and1
s. Then you multiply by the values in B.单元格F12中的公式为:
拖动
Formula in cell F12 is:
Drag down
使用 excel 365 您可以做到这一点,例如 -
< img src =“ https://i.sstatic.net/ai0zi.png” alt =“在此处输入图像说明”>
With Excel 365 you can do it like-