Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 386
Default Possible?

Hi,

Is there a formula/code that could look through the following table and sum
up adjacent values IF the sum of their weights is less than 400 OR can be
divided into several runs of between 100 and 400kg?

The last point Ill explain first if there are two orders one of 390kg and
another of 90kg I dont want to combine the orders because it will be over
400kg and I dont want to make a 400kg part and then a 80kg part because its
not what the customer wants. However if the orders were for 600kg and 90kg
then I would make one of 400kg and one of 290kg because in any case the limit
of 400 will be passed by the first order and the customer must accept that
his order will be effectively made of two parts stuck together of 400 and 200
to get his 600. If it was a 410 plus a 50 I would do something else, and in
this case I want the formula to show a result of 410 for the first and 50 for
the second. So if by adding/splitting cannot create something less than 100.

Product Weight Combined Weight
A 280 280
B 200 ----
B 150 350
C 50 50
A 100 -----
A 75 175
B 150 350
B 350 ----
B 25 375
C 365 365
C 60 60
C 450 ----
C 300 750
D 100 ----
D 50 ----
D 100 ----
D 75 ----
D 60 385


Anywhere where Ive put a --- means that I dont need any result, or a
result, whatever is easiest.

Is this possible with a formula or does it need code?

Thanks
LiAD
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:24 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright 2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"