Find a highest consecutive range in a column

EWek1

New Member
Joined
Jan 16, 2006
Messages
32
If I have a column with 365 rows with each cell representing total sales for each day of the year. If I wanted to find any 30 consecutive days with the highest sum, how could I do that?
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Interesting. Try:

ABCDE
1DaySalesDay30 Day Max
212517017191
32931
43295
54566
6510
76677

<tbody>
</tbody>
Sheet9

Array Formulas
CellFormula
D2{=MIN(IF(SUBTOTAL(9,OFFSET($B$2,ROW($B$2:$B$336)-ROW($B$2),0,30))=E2,$A$2:$A$336))}
E2{=MAX(SUBTOTAL(9,OFFSET($B$2,ROW($B$2:$B$336)-ROW($B$2),0,30)))}

<tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,377
Messages
6,124,597
Members
449,174
Latest member
chandan4057

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