Excel电子表格:如何查找同一行中两组列之间的差异
不确定这是否可能,但也许有人知道如何做到这一点。我有一行 6 列 (AF)。前三列是一组,后三列是不同的组。我想对两组进行求和,然后找出总和之间的差异。例如,如果该行是:
A1 A2 A3 A4 A5 A6
4 5 6 7 8 9
我想添加 4+5+6 和 7+8+9,然后找到两个总和之间的差。
Not sure this is even possible, but perhaps someone knows how to do it. I have a row with 6 columns (A-F). The first three columns are one set and the last three columns are a different set. I want to sum both sets and then find the difference between the sums. For example if the row is:
A1 A2 A3 A4 A5 A6
4 5 6 7 8 9
I want to add 4+5+6 and 7+8+9 and then find the difference between the two sums.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我认为它是这样的:
=SUM(A1:A3)-SUM(A4:A6)
。如果您只对大小感兴趣,可以将其设置为绝对值:
=ABS(SUM(A1:A3)-SUM(A4:A6))
。[编辑以匹配修订后的帖子]
另外,现在我更仔细地阅读了您的帖子,您还提到您也想在列中添加项目。在这种情况下,其公式相同,只是更改字母而不是数字:
=SUM(A1:C1)-SUM(D1:F1)
。I think its something like this:
=SUM(A1:A3)-SUM(A4:A6)
.If you are only interested in the magnitude, you can put it in an absolute value:
=ABS(SUM(A1:A3)-SUM(A4:A6))
.[edited to match revised post]
Also, now that I read your post more carefully, you also mention you want to add items within columns as well. In that case, its the same formula, except you change the letters, not the numbers:
=SUM(A1:C1)-SUM(D1:F1)
.本着先前答案的精神,
另一个解决方案是:
美元不是必需的,但是如果您使用鼠标构建此公式,您将获得它们,并且它们并不重要。
In the spirit of the previous answer, it's
Another solution is:
The dollars aren't necessary, but if you build this formula using the mouse, you will get them and they don't matter.
您可以对每个集合进行分组并使用
=SUM()
求出它们的总和。你还提到有 6 列,即 AF,有 2 组,AC 和 DF,所以应该是这样的:或者
You can group each set and find their sum using
=SUM()
. You also mentioned that there are 6 columns which is A-F and there are 2 sets, A-C and D-F, so it should be something like this:Or