Scan for max sum of 3 concurrent days

RobotCarl

New Member
Joined
Oct 5, 2022
Messages
2
Office Version
  1. 2016
Platform
  1. Windows
Greetings all,

I am attempting to find the maximum sum of xx amount of concurrent days within the month. In the below example if my desired range is 3 days I would like to know the max. Looking at 3 days out of the 8, the sum of days 3,4,5 would be the max sum for three concurrent days. I would like Max Sum for desired day range to = 6. Anyone know how to achieve this?

Day 1Day 2Day 3Day 4Day 5Day 6Day7Day 8Desired Day Range
*Criteria
Max Sum for 3 Days
102220143
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
A couple of options for you depending on which version of excel you are using.
DavyJones90.xlsx
ABCDEFGHIJK
1Day 1Day 2Day 3Day 4Day 5Day 6Day 7Day 8CriteriaMax sum
21022201436<< Excel 2019 or older
36<< Excel 2021 or newer
Sheet2
Cell Formulas
RangeFormula
J2J2=MAX(SUBTOTAL(9,OFFSET($A$2,,COLUMN($A$2:OFFSET($A$2,,COLUMN($I$2)-1-$I$2))-COLUMN($A$2),,3)))
J3J3=MAX(SUBTOTAL(9,OFFSET($A$2,,SEQUENCE(,COLUMNS($A$2:$H$2)-$I$2,0),,3)))
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Solution
Thank you! I knew my efforts were on the cusp but you helped me out tremendously!
 
Upvote 0

Forum statistics

Threads
1,214,954
Messages
6,122,461
Members
449,085
Latest member
ExcelError

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