Excel spreadsheet: how to find the difference between two sets of columns in the same row
Not sure this is even possible, but perhaps someone knows how t开发者_如何学Co 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.
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
=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.
精彩评论