Possible?

L

LiAD

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 I’ll explain first – if there are two orders one of 390kg and
another of 90kg I don’t want to combine the orders because it will be over
400kg and I don’t 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 I’ve put a --- means that I don’t need any result, or a “â€
result, whatever is easiest.

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

Thanks
LiAD
 
R

Ron@Buy

Liad
Looking thro' your description and your table I don't think it is possible
to achieve what you require either by formula or code as there are too many
unexplained inconsistancies between the description of what you want and the
desired results you show in the table ! E.g. "divided into several runs of
between 100 and 400kg" yet I see a 750 ! "orders for 600kg and 90kg" & "stuck
together of 400 and 200 to get his 600" ! In the table - "Product B - weight
150 - combined weight 750" !! etc. etc.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top