Sum Largest Negative and Positive Question

MXL

Board Regular
Joined
Jun 15, 2010
Messages
67
hello,

I have a table I would like to sum the largest negative sums and also the largest positive sums within a column, the table will illustrate below;

ABB
11=a11
23=a1+a24
3-2=a2+a32
4-3=a3+a4-1
57=a4+a56
6-3=a5+a63
7Largest Positive Sum6
8Largest Negative Sum
-1

<tbody>
</tbody>

you can see in column A, the largest positive sum was in cell B5 with the sum of 6, the largest negative sum was in cell B4 with the negative sum of -1 Is there a formula I can input in cell B7 and B8 that will give me the largest positive and largest negative sums?

thank you for taking the time to read this and look forward to hearing from you all.
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
The largest positive sum would be...

=MAX(B1:B6)

and the largest negative sum would be...

=MIN(B1:B6)
 
Upvote 0
hello Rick,

thank you for your response much appreciated, would you be able to apply that formula without the helper column B1:B6? formula that can sum the largest running positive and negative sums in column A1:A6? i prefer not to have the helper column B1:B6. thank you and look forward to hearing from you.
 
Upvote 0
In your example wouldn't the largest possible sum be 4 since 7 + (-3) = 4

and also the largest negative sum be -5 since (-2) + (-3) = -5 ?

if so try:

=MAX(A1, A1:A5+A2:A6)

and

=MIN(A1, A1:A5+A2:A6)

both entered as arrays with ctrl + shift + enter
 
Upvote 0
hi finalfight40,

the aim is to try and sum the largest running sum total and negative sum starting at cell a1 in column A, so if you start start summing from cell A1 and go down to cell A2, A3, A4, A5, and finally A6, you will notice that the largest positive sum during that sequence was 6, and the time that the sum was at its lowest from cell A1 and go down to cell A2, A3, A4, A5, and finally A6 the sum was -1, so i am trying to find a formula that can give me the largest positive sum starting from cell A1 and the smallest sum starting from cell A1 at in column A. Basically, trying to find at what point was the sum the largest and smallest when summing from A1 down to A6.

thank you and look forward to hearing from you.
 
Upvote 0
Try:

=MAX(SUBTOTAL(9,OFFSET(A1,0,0,ROW(A1:A6)-ROW(A1)+1)))

and

=MIN(SUBTOTAL(9,OFFSET(A1,0,0,ROW(A1:A6)-ROW(A1)+1)))

both confirmed with Control+Shift+Enter.

These find the max and min sums of A1, A1+A2, A1+A2+A3, A1+A2+A3+A4, A1+A2+A3+A4+A5, A1+A2+A3+A4+A5+A6. If you want to include other possible sums, like A3+A4+A5, that's much trickier.
 
Upvote 0

Forum statistics

Threads
1,213,501
Messages
6,114,010
Members
448,543
Latest member
MartinLarkin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top