Excel电子表格:如何查找同一行中两组列之间的差异

发布于 2024-10-21 17:39:11 字数 194 浏览 5 评论 0原文

不确定这是否可能,但也许有人知道如何做到这一点。我有一行 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

无声静候 2024-10-28 17:39:11

我认为它是这样的:=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).

毁梦 2024-10-28 17:39:11

本着先前答案的精神,

=SUM($A$1:$A$3)-SUM($A$4:$A$6)

另一个解决方案是:

=$A$1+$A$2+$A$3-$A$4-$A$5-$A$6

美元不是必需的,但是如果您使用鼠标构建此公式,您将获得它们,并且它们并不重要。

In the spirit of the previous answer, it's

=SUM($A$1:$A$3)-SUM($A$4:$A$6)

Another solution is:

=$A$1+$A$2+$A$3-$A$4-$A$5-$A$6

The dollars aren't necessary, but if you build this formula using the mouse, you will get them and they don't matter.

痴者 2024-10-28 17:39:11

您可以对每个集合进行分组并使用 =SUM() 求出它们的总和。你还提到有 6 列,即 AF,有 2 组,AC 和 DF,所以应该是这样的:

=SUM(A1:C1)-SUM(D1:F1)

或者

=SUM(A1, B1, C1)-SUM(D1, E1, F1)

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:

=SUM(A1:C1)-SUM(D1:F1)

Or

=SUM(A1, B1, C1)-SUM(D1, E1, F1)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文