Counting total weeks cover

brainboxbiscuit

New Member
Joined
Oct 4, 2022
Messages
1
Office Version
  1. 2019
Platform
  1. Windows
Hi I'm trying to count the max number of forecast cells which sum up to less than the order amount of 300

eg, 90+90+60+50=290, which is the highest summed value but is less than my order total of 300 so this is 4 weeks. This is the answer I want in my wks cover cell. I want my wks cover cell to show 4.
90+90+60+50+30=320 is greater than 300 and therefore do not want my wks cover to show this as its higher than 300

Can anyone help with the formula pls? (I have approx 400 lines with multiple different inputs so need something which helps multiple times, not just for this one instance)

1664892560605.png


Thanks
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
MrExcelPlayground12.xlsx
ABCDEFGHIJKL
1Order78910111213141516Wks Cover
2300909060503030303030304
Sheet17
Cell Formulas
RangeFormula
L2L2=SUMPRODUCT(--(SUBTOTAL(9,OFFSET(B2:K2,,,,COLUMN(B2:K2)-COLUMN(INDEX(B2:K2,1,1))+1))<=A2))
 
Upvote 0

Forum statistics

Threads
1,214,919
Messages
6,122,260
Members
449,075
Latest member
staticfluids

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